diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 61cfe9b2ae..9884fd72e7 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -797,7 +797,8 @@ test_create_repo () { mkdir -p "$repo" ( cd "$repo" || error "Cannot setup test environment" - "$GIT_EXEC_PATH/git$X" init "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 || + "${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git$X" init \ + "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 || error "cannot run git init -- have you built things yet?" mv .git/hooks .git/hooks-disabled ) || exit