Skip to contentSkip to conversation

Ensure that a test is run in the trash directory

PATCH New Alex Riesen 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Ensure that a test is run in the trash directory

Exit with error if cd into the "trash directory" failed (error already reported, so just exit).

---

Multi-user systems have their own kind of glitches: _someone_ removes your files.

 t/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
t/test-lib.sh +1 -1
index 5002fb0..d1018c9 100644
@@ -419,7 +419,7 @@ rm -fr "$test" || {
 }
 
 test_create_repo "$test"
-cd "$test"
+cd "$test" || exit 1
 
 this_test=$(expr "./$0" : '.*/\(t[0-9]*\)-[^/]*$')
 for skp in $GIT_SKIP_TESTS
Signature · 1 line
1.5.5.1.354.g902c