From 7f9f230b7fcc1bfeb352216930f704075bca713d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 5 Apr 2024 17:09:00 -0700 Subject: t: local VAR="VAL" (quote command substitution) Future-proof test scripts that do local VAR=VAL without quoting VAL (which is OK in POSIX but broken in some shells) that is a $(command substitution). Signed-off-by: Junio C Hamano --- t/test-lib-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/test-lib-functions.sh') diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index fc60708471..4cc7d74f11 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -1840,7 +1840,7 @@ test_subcommand () { shift fi - local expr=$(printf '"%s",' "$@") + local expr="$(printf '"%s",' "$@")" expr="${expr%,}" if test -n "$negate" -- cgit v1.2.3