diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-06-30 10:18:35 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-30 20:48:28 (GMT) |
commit | 361fa321ec25cbbdf21df9309a82e5280c19fa02 (patch) | |
tree | 32ac1c736a504e51d1529d6b93b96426020b3367 /t | |
parent | 386e7a9d307938eb9827c1c65ef75dc38daf0b3c (diff) | |
download | git-361fa321ec25cbbdf21df9309a82e5280c19fa02.zip git-361fa321ec25cbbdf21df9309a82e5280c19fa02.tar.gz git-361fa321ec25cbbdf21df9309a82e5280c19fa02.tar.bz2 |
test-lib.sh: fix prepend_var() quoting issue
Fix a quoting issue in the function introduced in
b9638d7286f (test-lib: make $GIT_BUILD_DIR an absolute path,
2022-02-27), running the test suite where the git checkout was on a
path with e.g. a space in it would fail.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r-- | t/test-lib.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 736c644..76bce78 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -57,14 +57,14 @@ fi # # prepend_var VAR : VALUE prepend_var () { - eval "$1=$3\${$1:+${3:+$2}\$$1}" + eval "$1=\"$3\${$1:+${3:+$2}\$$1}\"" } # If [AL]SAN is in effect we want to abort so that we notice # problems. The GIT_SAN_OPTIONS variable can be used to set common # defaults shared between [AL]SAN_OPTIONS. prepend_var GIT_SAN_OPTIONS : abort_on_error=1 -prepend_var GIT_SAN_OPTIONS : strip_path_prefix=\"$GIT_BUILD_DIR/\" +prepend_var GIT_SAN_OPTIONS : strip_path_prefix="$GIT_BUILD_DIR/" # If we were built with ASAN, it may complain about leaks # of program-lifetime variables. Disable it by default to lower |