gclient: error if fetch command is called in non-git env

Bug: 339231299
Change-Id: I090b634afbea978270bb6d1f859cd0a6eeca2489
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5534146
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
changes/46/5534146/2
Yiwei Zhang 1 year ago committed by LUCI CQ
parent adfd994f98
commit bacc5f189b

@ -3022,6 +3022,9 @@ def CMDfetch(parser, args):
Completely git-specific. Simply runs 'git fetch [args ...]' for each module.
"""
if gclient_utils.IsEnvCog():
raise gclient_utils.Error(
'gclient fetch command is not supported in non-git environment.')
(options, args) = parser.parse_args(args)
return CMDrecurse(
OptionParser(),

Loading…
Cancel
Save