summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2006-01-05 11:57:36 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-06 01:24:47 (GMT)
commit2ccd2027b012f481018b9a95929fa8df6ce1d33f (patch)
treef8487ae456818a356b7181a6870d4486bcaff8c4 /t/test-lib.sh
parent10ae7d86c170554bc815ec460a83b608715063c1 (diff)
downloadgit-2ccd2027b012f481018b9a95929fa8df6ce1d33f.zip
git-2ccd2027b012f481018b9a95929fa8df6ce1d33f.tar.gz
git-2ccd2027b012f481018b9a95929fa8df6ce1d33f.tar.bz2
trivial: check, if t/trash directory was successfully created
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>
Diffstat (limited to 't/test-lib.sh')
-rwxr-xr-xt/test-lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index a97d259..7534a76 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -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?"