From 236fa43af2709980a41c920148caa15f1c165275 Mon Sep 17 00:00:00 2001 From: Max Levine Date: Thu, 4 Jan 2024 16:50:55 +0000 Subject: [PATCH] fix(action)!: Fix preserve-block-position default 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 --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 6ba87835..1a29f336 100644 --- a/action.yml +++ b/action.yml @@ -58,7 +58,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