Skip to content

Commit 734918a

Browse files
committed
Merge branch 'mm/test-in-absolute-home' into jch
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 10e7779 + 2d207ed commit 734918a

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
@@ -1584,6 +1584,8 @@ fi
15841584
# Use -P to resolve symlinks in our working directory so that the cwd
15851585
# in subprocesses like git equals our $PWD (for pathname comparisons).
15861586
cd -P "$TRASH_DIRECTORY" || BAIL_OUT "cannot cd -P to \"$TRASH_DIRECTORY\""
1587+
TRASH_DIRECTORY=$(pwd)
1588+
HOME="$TRASH_DIRECTORY"
15871589

15881590
start_test_output "$0"
15891591

0 commit comments

Comments
 (0)