mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
fail if fetch command is called in Cog
Bug: 345486495 Change-Id: I858a4041b54049cc52cf1a15f0aed461f3ddf985 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5606279 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:
7
fetch.py
7
fetch.py
@@ -24,6 +24,7 @@ import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import gclient_utils
|
||||
import git_common
|
||||
|
||||
from distutils import spawn
|
||||
@@ -270,6 +271,12 @@ def run(options, spec, root):
|
||||
method (checkout type, repository url, etc.).
|
||||
root: The directory into which the repo expects to be checkout out.
|
||||
"""
|
||||
if gclient_utils.IsEnvCog():
|
||||
print(
|
||||
'Your current directory appears to be in a Cog workspace.'
|
||||
'"fetch" command is not supported in this environment.',
|
||||
file=sys.stderr)
|
||||
return 1
|
||||
assert 'type' in spec
|
||||
checkout_type = spec['type']
|
||||
checkout_spec = spec['%s_spec' % checkout_type]
|
||||
|
||||
Reference in New Issue
Block a user