Skip to content

Commit

Permalink
fix(action)!: Fix preserve-block-position default (#393)
Browse files Browse the repository at this point in the history
Current logic adds `--preserve-block-position` to list of args if the
length of the value provided to the `preserve-block-position` github
actions variable is not zero. Since it defaults to the string `false`,
this effectively defaults it to true. You can only disable it by setting
it explicitly to an empty string. This PR corrects this logic by only
enabling `preserve-block-position` if it's explicitly set to true.

BREAKING CHANGE: Effectively change default value for
preserve-block-position in github actions
  • Loading branch information
bmaximuml authored Jan 15, 2024
1 parent 64b1e41 commit f4ae6ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ runs:
ARGS_INPUT+=("--check")
fi
if [ ! -z "${{inputs.preserve-block-position}}" ]; then
if [ "${{inputs.preserve-block-position}}" = "true" ]; then
ARGS_INPUT+=("--preserve-block-position")
fi
Expand Down

0 comments on commit f4ae6ee

Please sign in to comment.