diff --git a/entrypoint.sh b/entrypoint.sh index 95de31b..d3a358b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,7 @@ # e is for exiting the script automatically if a command fails, u is for exiting if a variable is not set # x would be for showing the commands before they are executed set -eu -shopt -s globstar nullglob +shopt -s globstar # FUNCTIONS # Function for setting up git env in the docker container (copied from https://github.com/stefanzweifel/git-auto-commit-action/blob/master/entrypoint.sh) @@ -63,7 +63,8 @@ fi PRETTIER_RESULT=0 echo "Prettifying files..." echo "Files:" -prettier $INPUT_PRETTIER_OPTIONS || { PRETTIER_RESULT=$?; echo "Problem running prettier with $INPUT_PRETTIER_OPTIONS"; } +prettier $INPUT_PRETTIER_OPTIONS \ + || { PRETTIER_RESULT=$?; echo "Problem running prettier with $INPUT_PRETTIER_OPTIONS"; exit 1; } # Ignore node modules and other action created files if [ -d 'node_modules' ]; then