We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6fa1b1 commit 68744bdCopy full SHA for 68744bd
entrypoint.sh
@@ -13,8 +13,13 @@ function convertToGitHubActionsLoggingCommands() {
13
14
if ! ${DIFF_BASE+false};
15
then
16
- changedFiles="-- "
17
- changedFiles+=$(git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD $DIFF_BASE) -- '*.swift')
+ changedFiles=$(git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD $DIFF_BASE) -- '*.swift')
+
18
+ if [ -z "$changedFiles" ]
19
+ then
20
+ echo "No Swift file changed"
21
+ exit
22
+ fi
23
fi
24
-set -o pipefail && swiftlint "$@" $changedFiles | stripPWD | convertToGitHubActionsLoggingCommands
25
+set -o pipefail && swiftlint "$@" -- $changedFiles | stripPWD | convertToGitHubActionsLoggingCommands
0 commit comments