From 78bcb0dd2a265b9b34b586a170543d37fa4aebd1 Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Wed, 20 Sep 2023 10:11:01 -0600 Subject: [PATCH] Make shellcheck happier --- would-reformat.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/would-reformat.sh b/would-reformat.sh index 9f9f307..ce1e106 100755 --- a/would-reformat.sh +++ b/would-reformat.sh @@ -68,7 +68,7 @@ elif [[ $file_type == "dart" ]] ; then # probably others too :( syntax_error_retval=65 - out=$(dart format -o none --set-exit-if-changed $file) + out=$(dart format -o none --set-exit-if-changed "$file") exitval="$?" retval="$exitval" else @@ -77,13 +77,13 @@ else fi -if [[ x"$retval" == x"$success_retval" ]]; then +if [[ "$retval" == "$success_retval" ]]; then echo -n "would not change" exit 0 -elif [[ x"$retval" == x"$would_reformat_retval" ]]; then +elif [[ "$retval" == "$would_reformat_retval" ]]; then echo -n "would change" exit 1 -elif [[ x"$retval" == x"$syntax_error_retval" ]]; then +elif [[ "$retval" == "$syntax_error_retval" ]]; then echo -n "syntax error" echo echo "$out"