mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-10 18:21:28 +00:00
fail gracefully if git find-releases is called in cog
Bug: 339231299 Change-Id: I70e02cf053bae635d3db007fc9ef3aa534e6c749 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5539650 Commit-Queue: Josip Sokcevic <sokcevic@chromium.org> Auto-Submit: Yiwei Zhang <yiwzhang@google.com> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
@@ -15,6 +15,7 @@ import optparse
|
||||
import re
|
||||
import sys
|
||||
|
||||
import gclient_utils
|
||||
import git_common as git
|
||||
|
||||
|
||||
@@ -37,6 +38,10 @@ def GetMergesForCommit(sha1):
|
||||
|
||||
|
||||
def main(args):
|
||||
if gclient_utils.IsEnvCog():
|
||||
print('find-releases command is not supported in non-git environment.',
|
||||
file=sys.stderr)
|
||||
return 1
|
||||
parser = optparse.OptionParser(usage=sys.modules[__name__].__doc__)
|
||||
_, args = parser.parse_args(args)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user