Skip to content

Commit 2ccd202

Browse files
raalkmlJunio C Hamano
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 10ae7d8 commit 2ccd202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/test-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ test -d ../templates/blt || {
195195
test=trash
196196
rm -fr "$test"
197197
mkdir "$test"
198-
cd "$test"
198+
cd "$test" || error "Cannot setup test environment"
199199
"$GIT_EXEC_PATH/git" init-db --template=../../templates/blt/ 2>/dev/null ||
200200
error "cannot run git init-db -- have you built things yet?"
201201

0 commit comments

Comments
 (0)