]> git.ipfire.org Git - thirdparty/git.git/commitdiff
trivial: check, if t/trash directory was successfully created
authorAlex Riesen <raa.lkml@gmail.com>
Thu, 5 Jan 2006 11:57:36 +0000 (12:57 +0100)
committerJunio C Hamano <junkio@cox.net>
Fri, 6 Jan 2006 01:24:47 +0000 (17:24 -0800)
and was successfully entered. Otherwise git-init-db will create it directly
in the working directory (t/) which can be dangerous.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/test-lib.sh

index a97d259e26bc269c8f370f1d3bfa82e7d6cb9831..7534a762084b9883af42febe630e47b14413d39e 100755 (executable)
@@ -195,7 +195,7 @@ test -d ../templates/blt || {
 test=trash
 rm -fr "$test"
 mkdir "$test"
-cd "$test"
+cd "$test" || error "Cannot setup test environment"
 "$GIT_EXEC_PATH/git" init-db --template=../../templates/blt/ 2>/dev/null ||
 error "cannot run git init-db -- have you built things yet?"