gclient: error if grep command is called in cog env

Bug: 339231299
Change-Id: I8b1d0e76342b180a4ec100f22ce8be85b9a35664
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5533260
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
changes/60/5533260/3
Yiwei Zhang 12 months ago committed by LUCI CQ
parent 4040383e2d
commit d625750652

@ -3491,6 +3491,9 @@ def CMDgrep(parser, args):
file=sys.stderr)
return 1
if gclient_utils.IsEnvCog():
raise gclient_utils.Error('gclient grep command is not supported.')
jobs_arg = ['--jobs=1']
if re.match(r'(-j|--jobs=)\d+$', args[0]):
jobs_arg, args = args[:1], args[1:]

Loading…
Cancel
Save