提交 bf64582f 编写于 作者: B Bob Van Landuyt

Fix warning when cloning repo that already exists

fixes the warning:

fatal: destination path '~/gitlab-ce/gitlab/tmp/tests/gitlab-test-fork_bare' already exists and is not an empty directory.
上级 9fc17f6f
......@@ -131,8 +131,10 @@ module TestEnv
set_repo_refs(repo_path, branch_sha)
# We must copy bare repositories because we will push to them.
system(git_env, *%W(#{Gitlab.config.git.bin_path} clone -q --bare #{repo_path} #{repo_path_bare}))
unless File.directory?(repo_path_bare)
# We must copy bare repositories because we will push to them.
system(git_env, *%W(#{Gitlab.config.git.bin_path} clone -q --bare #{repo_path} #{repo_path_bare}))
end
end
def copy_repo(project)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册