Skip to content

Commit 66ab0eb

Browse files
authored
Merge pull request #168 from rojopolis/issue167
Bug fix for issue 167
2 parents 056dc39 + 8fafea0 commit 66ab0eb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

entrypoint.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,19 @@ fi
9494

9595
echo "----------------------------------------------------------------"
9696

97+
EXITCODE=0
98+
9799
# shellcheck disable=SC2086
98100
if [ -n "$INPUT_OUTPUT_FILE" ]; then
99101
pyspelling --verbose --config "$SPELLCHECK_CONFIG_FILE" $TASK_NAME $SOURCES_LIST | tee "$INPUT_OUTPUT_FILE"
102+
EXITCODE=${PIPESTATUS[0]}
100103
else
101104
pyspelling --verbose --config "$SPELLCHECK_CONFIG_FILE" $TASK_NAME $SOURCES_LIST
105+
EXITCODE=$?
102106
fi
103107

108+
test "$EXITCODE" -gt 1 && echo "::error title=Spelling check::Spelling check action failed, please check diagnostics";
104109

110+
test "$EXITCODE" -eq 1 && echo "::error title=Spelling errors::Files in repository contain spelling errors";
105111

106-
EXITCODE=$?
107-
108-
test $EXITCODE -gt 1 && echo "::error title=Spelling check::Spelling check action failed, please check diagnostics";
109-
110-
test $EXITCODE -eq 1 && echo "::error title=Spelling errors::Files in repository contain spelling errors";
111-
112-
exit $EXITCODE
112+
exit "$EXITCODE"

0 commit comments

Comments
 (0)