mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
launcher: make missing .repo/repo/repo an error
If the specified repo dir doesn't actually have a `repo` program, we only show a warning before continuing on, and then we fail in weird ways. Since we really need the repo dir to contain repo, have this be fatal and delete the results. Bug: https://crbug.com/gerrit/13526 Change-Id: Icee4cba96136d470cbb459a81918c40205078f98 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343538 Reviewed-by: LaMont Jones <lamontjones@google.com> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
a010a9f4a0
commit
d75ca2eb9d
5
repo
5
repo
@ -624,8 +624,9 @@ def _Init(args, gitc_init=False):
|
||||
_Checkout(dst, remote_ref, rev, opt.quiet)
|
||||
|
||||
if not os.path.isfile(os.path.join(dst, 'repo')):
|
||||
print("warning: '%s' does not look like a git-repo repository, is "
|
||||
"REPO_URL set correctly?" % url, file=sys.stderr)
|
||||
print("fatal: '%s' does not look like a git-repo repository, is "
|
||||
"--repo-url set correctly?" % url, file=sys.stderr)
|
||||
raise CloneFailure()
|
||||
|
||||
os.rename(dst, dst_final)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user