mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-12 19:30:30 +02:00
fix: fixes handling of bad case where there are unpretty files and command output is not 0
This commit is contained in:
@@ -51,13 +51,14 @@ fi
|
||||
|
||||
echo "Prettifying files..."
|
||||
echo "Files:"
|
||||
prettier $INPUT_PRETTIER_OPTIONS || echo "Problem running prettier with $INPUT_PRETTIER_OPTIONS"
|
||||
prettier $INPUT_PRETTIER_OPTIONS
|
||||
PRETTIER_RESULT=$?
|
||||
|
||||
# To keep runtime good, just continue if something was changed
|
||||
if _git_changed; then
|
||||
if $INPUT_DRY; then
|
||||
if [[ "$PRETTIER_RESULT" -eq 1 ]]; then
|
||||
echo "Problem running prettier with $INPUT_PRETTIER_OPTIONS"
|
||||
echo "Prettier found unpretty files!"
|
||||
exit 1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user