From 607140cce3af562dda8a41d309f0d3458f0a93c1 Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Wed, 20 Sep 2023 07:38:42 -0600 Subject: [PATCH] Use use prettier wrapper script to reformat --- do-reformat.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/do-reformat.sh b/do-reformat.sh index 1ef754d..abfcce4 100755 --- a/do-reformat.sh +++ b/do-reformat.sh @@ -11,6 +11,8 @@ file="$1" file_type=$(sniff_file_type $file) +export WOULD_REFORMAT=do_reformat + if [[ $file_type == "javascript" || \ $file_type == "vue" || \ $file_type == "css" || \ @@ -22,7 +24,7 @@ if [[ $file_type == "javascript" || \ $file_type == "css" || \ $file_type == "scss" || \ $file_type == "sh" ]]; then - out=$(npx prettier --write $file) + out=$("$(wfroot "$DIR")"/./prettier.sh "$file") retval="$?" success_retval=0 elif [[ $file_type == "python" ]]; then