Make shellcheck happier

This commit is contained in:
Michael Wolf
2023-09-20 10:10:04 -06:00
parent d486fe6217
commit 5f9d2f7679

View File

@@ -9,17 +9,20 @@ source "$DIR/_reformat-common.bash"
file="$1" file="$1"
wrflog running against file $file wrflog running against file "$file"
if [[ x"$WOULD_REFORMAT" = x"would_reformat" ]] ; then if [[ "$WOULD_REFORMAT" = "would_reformat" ]] ; then
out=$(npx prettier --check $file 2>&1 >/dev/null) out=$(npx prettier --check "$file" 2>&1 >/dev/null)
retval="$?" retval="$?"
echo "$out"
exit "$retval" exit "$retval"
fi fi
if [[ x"$WOULD_REFORMAT" = x"do_reformat" ]] ; then # if [[ "$WOULD_REFORMAT" = "do_reformat" ]] ; then
out=$(npx prettier --write $file 2>&1 >/dev/null) out=$(npx prettier --write "$file" 2>&1 >/dev/null)
retval="$?" retval="$?"
echo "$out"
exit "$retval" exit "$retval"
fi fi