upload: exit non-zero when preupload hooks fail

Bug: https://crbug.com/gerrit/13159
Change-Id: Id140b619242c841223c6bc5d4aa0c37a7ce0219d
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/276294
Reviewed-by: Jonathan Nieder <jrn@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Mike Frysinger 2020-07-22 03:23:20 -04:00
parent 89f3ae5ae6
commit 80944b538d

View File

@ -596,7 +596,7 @@ Gerrit Code Review: https://www.gerritcodereview.com/
print('\nWARNING: pre-upload hooks failed, but uploading anyways.',
file=sys.stderr)
else:
return
return 1
if opt.reviewers:
reviewers = _SplitEmails(opt.reviewers)