diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-04-05 17:09:00 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-04-05 22:50:10 -0700 |
| commit | 7f9f230b7fcc1bfeb352216930f704075bca713d (patch) | |
| tree | ab2ac4c0b265bfb8839954886db1640a85177839 /t/test-lib-functions.sh | |
| parent | t: local VAR="VAL" (quote positional parameters) (diff) | |
| download | git-7f9f230b7fcc1bfeb352216930f704075bca713d.tar.gz git-7f9f230b7fcc1bfeb352216930f704075bca713d.zip | |
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 <gitster@pobox.com>
Diffstat (limited to 't/test-lib-functions.sh')
| -rw-r--r-- | t/test-lib-functions.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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" |
