diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-09 12:22:42 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-09 13:08:31 +0000 |
commit | 4c85f5a65adbe2a96f0690788a25146950b31397 (patch) | |
tree | e806cfb022d77c73b0b089d4afe66a7331df9af7 | |
parent | 9fd10d6d6a5b67cbba36a82c1ea5342526c32d50 (diff) |
test suite: t-tstunt: When looking for real thing, strip stunt from PATH
Otherwise if we run this again in a fresh environment, the wrapper may
be on PATH even though DGIT_TEST_REAL_<FOO> is not set.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | tests/lib | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -801,7 +801,14 @@ t-tstunt--save-real () { local rc local real set +e - real=$(type -p "$f") + real=$( + p=":$PATH:" + p="${p/:"$tmp/tstunt":/:}" + p="${p%:}" + p="${p#:}" + PATH="$p" + type -p "$f" + ) rc=$? set -e |