From 2ccd2027b012f481018b9a95929fa8df6ce1d33f Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Thu, 5 Jan 2006 12:57:36 +0100 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- t/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index a97d259e..7534a762 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?" -- 2.11.0