mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 02:31:29 +00:00
error if repo command is called in Cog environment
Bug: 345486495 Change-Id: I0a03d210b5662828f65dc45bd0121c33bd6480f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608833 Auto-Submit: Yiwei Zhang <yiwzhang@google.com> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
6
repo
6
repo
@@ -15,6 +15,8 @@ from pathlib import Path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import gclient_utils
|
||||
|
||||
# Some useful paths.
|
||||
DEPOT_TOOLS_DIR = Path(__file__).resolve().parent
|
||||
UPDATE_DEPOT_TOOLS = DEPOT_TOOLS_DIR / 'update_depot_tools'
|
||||
@@ -45,6 +47,10 @@ def _UpdateDepotTools():
|
||||
|
||||
|
||||
def main(argv):
|
||||
if gclient_utils.IsEnvCog():
|
||||
print('"repo" is not supported in non-git environment.',
|
||||
file=sys.stderr)
|
||||
return 1
|
||||
# This is a bit hacky, but should be "good enough". If repo itself gains
|
||||
# support for sync hooks, we could switch to that.
|
||||
if argv and argv[0] == 'sync':
|
||||
|
||||
Reference in New Issue
Block a user