Skip to content

Commit 427b538

Browse files
committed
Merge branch 'mm/test-in-absolute-home'
Tests that compare $HOME and $(pwd), which should be the same directory unless the tests chdir's around, would fail when the user enters the test directory via symbolic links, which has been corrected. * mm/test-in-absolute-home: t: run tests from a normalized working directory
2 parents 8db3019 + 2d207ed commit 427b538

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

t/test-lib.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,8 @@ fi
15771577
# Use -P to resolve symlinks in our working directory so that the cwd
15781578
# in subprocesses like git equals our $PWD (for pathname comparisons).
15791579
cd -P "$TRASH_DIRECTORY" || BAIL_OUT "cannot cd -P to \"$TRASH_DIRECTORY\""
1580+
TRASH_DIRECTORY=$(pwd)
1581+
HOME="$TRASH_DIRECTORY"
15801582

15811583
start_test_output "$0"
15821584

0 commit comments

Comments
 (0)