From 70f47fbe7e497da674d53a18f8a175fb85c23f3f Mon Sep 17 00:00:00 2001 From: Fabricio Sander Date: Thu, 25 Mar 2021 20:50:30 -0300 Subject: [PATCH] fix: fixes handling of bad case where there are unpretty files and command output is not 0 --- entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index d427fa4..0705eef 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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