From 19ea462bb482766a9b765ef62dd4d609d47e7d99 Mon Sep 17 00:00:00 2001 From: tomeichlersmith Date: Fri, 22 Nov 2024 16:00:33 -0600 Subject: [PATCH] use xargs instead of cat allows possibility of white-space characters in filepaths --- justfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index d753b35a1..6fe50562e 100644 --- a/justfile +++ b/justfile @@ -174,8 +174,10 @@ shellcheck: #!/usr/bin/env sh set -x format_list=$(mktemp) - git ls-tree -r HEAD | awk '{ if ($1 == 100755 || $4 ~ /\.sh/) print $4 }' > ${format_list} - shellcheck --severity style --shell sh $(cat ${format_list}) + git ls-tree -r HEAD | awk '{ if ($1 == 100755 || $4 ~ /\.sh/) print $4 }' \ + > "${format_list}" + xargs --arg-file="${format_list}" \ + shellcheck --severity style --shell sh rm "${format_list}" # check a script recipe also using shellcheck