mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-16 21:30:31 +02:00
Displaying prettier error when a glob doesn't match any files
This commit is contained in:
@@ -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
|
# 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
|
# x would be for showing the commands before they are executed
|
||||||
set -eu
|
set -eu
|
||||||
shopt -s globstar nullglob
|
shopt -s globstar
|
||||||
|
|
||||||
# FUNCTIONS
|
# 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)
|
# 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
|
PRETTIER_RESULT=0
|
||||||
echo "Prettifying files..."
|
echo "Prettifying files..."
|
||||||
echo "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
|
# Ignore node modules and other action created files
|
||||||
if [ -d 'node_modules' ]; then
|
if [ -d 'node_modules' ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user