logo

utils-std

Collection of commonly available Unix tools
commit: 03053d824fea8e4c926a1c3251fabb2729287a9f
parent 580f1d1cca9b695017bed7f105f0b9a2fa4d1ef2
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  1 Aug 2024 02:43:32 +0200

test-cmd/pwd: Remove tmpdir in the correct directory

Diffstat:

Mtest-cmd/pwd.sh5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test-cmd/pwd.sh b/test-cmd/pwd.sh @@ -19,7 +19,10 @@ then test -d "$tmpdir" || exit 1 oldpwd="$PWD" cd "$tmpdir" || exit 1 - rm -fr "$tmpdir" || exit 1 + ( + cd "$oldpwd" || exit 1 + rm -r "$tmpdir" || exit 1 + ) t --exit=1 enoent '' 'pwd: getcwd: No such file or directory ' cd "$oldpwd"