Commit cdac80c9 authored by nodir's avatar nodir Committed by Commit bot

bot_update: fix git dir check

existance of a dir does not mean it is a git repo. Check .git dir
presence instead.

This is the reason why swarmbucket build.git builds fail.

TBR=hinoka@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2174923002
parent b3a2148c
......@@ -834,7 +834,7 @@ def need_to_run_deps2git(repo_base, deps_file, deps_git_file):
last_known_deps_git_ref, cwd=repo_base).strip()
# If the merge base of the last DEPS and last .DEPS.git file is not
# equivilent to the hash of the last DEPS file, that means the DEPS file
# equivalent to the hash of the last DEPS file, that means the DEPS file
# was committed after the last .DEPS.git file.
return last_known_deps_ref != merge_base_ref
......@@ -966,7 +966,7 @@ def git_checkout(solutions, revisions, shallow, refs, git_cache_dir):
'clone', '--no-checkout', '--local', '--shared', mirror_dir, sln_dir)
try:
if not path.isdir(sln_dir):
if not path.isdir(os.path.join(sln_dir, '.git')):
git(*clone_cmd)
else:
git('remote', 'set-url', 'origin', mirror_dir, cwd=sln_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment