forall: exit 1 if we skip any repos

If a repo doesn't exist (e.g. an incomplete sync), make sure we exit
non-zero when they get skipped.

Change-Id: Ifff711e374416b1e6b9b8da4fdc6f14b27ced450
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/239235
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Mike Frysinger 2019-09-30 23:47:03 -04:00
parent 71b0f312b1
commit dc1b59d2c0

View File

@ -323,10 +323,10 @@ def DoWork(project, mirror, opt, cmd, shell, cnt, config):
cwd = project['worktree'] cwd = project['worktree']
if not os.path.exists(cwd): if not os.path.exists(cwd):
if (opt.project_header and opt.verbose) \ if ((opt.project_header and opt.verbose)
or not opt.project_header: or not opt.project_header):
print('skipping %s/' % project['relpath'], file=sys.stderr) print('skipping %s/' % project['relpath'], file=sys.stderr)
return return 1
if opt.project_header: if opt.project_header:
stdin = subprocess.PIPE stdin = subprocess.PIPE