Make shellcheck happier
This commit is contained in:
13
prettier.sh
13
prettier.sh
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user