diff --git a/scripts/check_format.sh b/scripts/check_format.sh index d0d73c23e..f59787b6d 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -338,7 +338,7 @@ if [ -n "$shfmt" ]; then shfmt_cmdline+=(-d) # diffOut - print diff of the changes and exit with != 0 shfmt_cmdline+=(-sr) # redirect operators will be followed by a space - diff=$PWD/$shfmt.patch + diff=${output_dir:-$PWD}/$shfmt.patch # Explicitly tell shfmt to not look for .editorconfig. .editorconfig is also not looked up # in case any formatting arguments has been passed on its cmdline.