mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 02:31:29 +00:00
fail gracefully if git map is called in cog
Bug: 339231299 Change-Id: Iba5519f7d9e9c18abfbae47866f6b91d821c54e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5539652 Auto-Submit: Yiwei Zhang <yiwzhang@google.com> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
@@ -19,6 +19,7 @@ point to them. Items are colorized as follows:
|
||||
import os
|
||||
import sys
|
||||
|
||||
import gclient_utils
|
||||
import git_common
|
||||
import setup_color
|
||||
import subprocess2
|
||||
@@ -98,6 +99,10 @@ def main(argv, outbuf):
|
||||
if '-h' in argv or '--help' in argv:
|
||||
_print_help(outbuf)
|
||||
return 0
|
||||
if gclient_utils.IsEnvCog():
|
||||
print('map command is not supported in non-git environment.',
|
||||
file=sys.stderr)
|
||||
return 1
|
||||
|
||||
map_extra = git_common.get_config_list('depot_tools.map_extra')
|
||||
cmd = [
|
||||
|
||||
Reference in New Issue
Block a user