From 9f3543661d5acbbc5c0ac95b3ec1d7e97e4d67dd Mon Sep 17 00:00:00 2001 From: cramte <42623182+cramte@users.noreply.github.com> Date: Sun, 3 May 2020 22:11:15 +0200 Subject: [PATCH] Fix runaction.sh return values --- runaction.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/runaction.sh b/runaction.sh index 486098c..2516f08 100644 --- a/runaction.sh +++ b/runaction.sh @@ -1,6 +1,8 @@ #!/bin/sh -cd "$GITHUB_WORKSPACE" || exit +cd "$GITHUB_WORKSPACE" || exit 1 + +err=0 find . '(' -name '*.bash' \ -o -path '*/.bash*' -o -path '*/bash*' \ @@ -19,7 +21,7 @@ find . '(' -name '*.bash' \ -o -name '*.sh' \ -o -path '*/.profile*' -o -path '*/profile*' \ -o -path '*/.shlib*' -o -path '*/shlib*' \ - ')' -exec shellcheck {} + || exit + ')' -exec shellcheck {} + || err=1 # shellcheck disable=SC2016 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=$? done exit $err - ' _ {} + || exit + ' _ {} + || err=1 if find . -path '*bin/*/*' -type f -perm /111 -print | grep . @@ -42,3 +44,5 @@ if find . -path '*bin/*' -name '*.*' -type f -perm /111 -perm /444 -print | then echo >&2 "WARNING: programs in PATH should not have a filename suffix" fi + +exit "$err"