Skip to content

Commit 787ef5f

Browse files
committed
Deals with cases where there is no unit test folder
1 parent f280974 commit 787ef5f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

SwiftLint/copy-and-run-swiftlint-config.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,15 @@ if [ $isFramework = true ]; then
238238
merge_swiftlint_configuration "swiftlint+frameworks.yml" "$tmpFile" "--write-to-file" "$tmpFile.frameworks"
239239
mv "$tmpFile.frameworks" "$tmpFile"
240240

241+
unitTestDir="false"
241242
# Find the unit test directory
242243
if [ -e "$projectDir/Unit-Tests" ]; then
243244
unitTestDir="$projectDir/Unit-Tests"
244245
elif [ -e "$projectDir/UnitTests" ]; then
245246
unitTestDir="$projectDir/UnitTests"
246247
fi
247248

248-
if [ -e $unitTestDir ]; then
249+
if [ -e $unitTestDir ] && [ $unitTestDir != "false" ]; then
249250
if [ -f "$unitTestDir/.project-swiftlint.yml" ]; then
250251
# Deals with .project-swiftlint.yml for unit tests
251252
rm "$unitTestDir/.swiftlint.yml"

0 commit comments

Comments
 (0)