mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-22 00:00:31 +02:00
Added hard break for dry mode
This commit is contained in:
@@ -44,8 +44,11 @@ echo "Files:"
|
||||
prettier $INPUT_PRETTIER_OPTIONS
|
||||
|
||||
# To keep runtime good, just continue if something was changed
|
||||
if ! $INPUT_DRY && _git_changed;
|
||||
if _git_changed;
|
||||
then
|
||||
if $INPUT_DRY; then
|
||||
exit 1
|
||||
else
|
||||
# Calling method to configure the git environemnt
|
||||
_git_setup
|
||||
echo "Commiting and pushing changes..."
|
||||
@@ -57,6 +60,7 @@ then
|
||||
git commit -m "$INPUT_COMMIT_MESSAGE" --author="$GITHUB_ACTOR <$GITHUB_ACTOR@users.noreply.github.com>" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"}
|
||||
_git_push
|
||||
echo "Changes pushed successfully."
|
||||
fi
|
||||
else
|
||||
echo "Nothing to commit. Exiting."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user