File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ echo -e "${GREEN} ###### RUNNING PRE-COMMIT HOOKS ###### ${NC}"
99
1010files=$( find . -type f -name " *.sh" -exec shfmt -l {} \; )
1111if [ -n " $files " ]; then
12- echo " Error: The following shell files need formatting:"
13- echo " $files "
14- echo " "
15- echo " Running: find . -type f -name \" *.sh\" -exec shfmt -w {} \\ ;"
12+ err " Error: The following shell files need formatting:"
13+ err " $files "
14+ err
15+ err " Running: find . -type f -name \" *.sh\" -exec shfmt -w {} \\ ;"
1616 find . -type f -name " *.sh" -execdir shfmt -w {} \;
17- echo " git add the formatted files and commit again"
17+ err " git add the formatted files and commit again"
1818 exit 1
1919fi
2020
Original file line number Diff line number Diff line change @@ -178,4 +178,8 @@ if [[ "${__INITPC_PRELUDE_SOURCED__}" != "true" ]]; then
178178 done
179179 set -x
180180 }
181+ err ()
182+ {
183+ echo " [$( date +' %Y-%m-%dT%H:%M:%S%z' ) ]: $* " >&2
184+ }
181185fi
You can’t perform that action at this time.
0 commit comments