1
0
Fork 0
mirror of https://github.com/ludeeus/action-shellcheck.git synced 2024-08-16 10:09:53 +02:00

Fix runaction.sh return values

This commit is contained in:
cramte 2020-05-03 22:11:15 +02:00
parent 746dd2ddc0
commit 9f3543661d

View file

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
cd "$GITHUB_WORKSPACE" || exit cd "$GITHUB_WORKSPACE" || exit 1
err=0
find . '(' -name '*.bash' \ find . '(' -name '*.bash' \
-o -path '*/.bash*' -o -path '*/bash*' \ -o -path '*/.bash*' -o -path '*/bash*' \
@ -19,7 +21,7 @@ find . '(' -name '*.bash' \
-o -name '*.sh' \ -o -name '*.sh' \
-o -path '*/.profile*' -o -path '*/profile*' \ -o -path '*/.profile*' -o -path '*/profile*' \
-o -path '*/.shlib*' -o -path '*/shlib*' \ -o -path '*/.shlib*' -o -path '*/shlib*' \
')' -exec shellcheck {} + || exit ')' -exec shellcheck {} + || err=1
# shellcheck disable=SC2016 # shellcheck disable=SC2016
find . -type f ! -name '*.*' -perm /111 -exec sh -c ' find . -type f ! -name '*.*' -perm /111 -exec sh -c '
@ -29,7 +31,7 @@ find . -type f ! -name '*.*' -perm /111 -exec sh -c '
shellcheck "$f" || err=$? shellcheck "$f" || err=$?
done done
exit $err exit $err
' _ {} + || exit ' _ {} + || err=1
if find . -path '*bin/*/*' -type f -perm /111 -print | if find . -path '*bin/*/*' -type f -perm /111 -print |
grep . grep .
@ -42,3 +44,5 @@ if find . -path '*bin/*' -name '*.*' -type f -perm /111 -perm /444 -print |
then then
echo >&2 "WARNING: programs in PATH should not have a filename suffix" echo >&2 "WARNING: programs in PATH should not have a filename suffix"
fi fi
exit "$err"