Skip to content

Commit

Permalink
Displaying prettier error when a glob doesn't match any files
Browse files Browse the repository at this point in the history
  • Loading branch information
hpedrorodrigues committed Jun 22, 2021
1 parent 8002e35 commit 6c9f8f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6c9f8f1

Please sign in to comment.