Преглед на файлове

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>
Yiwei Zhang преди 1 година
родител
ревизия
bacc5f189b
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      gclient.py

+ 3 - 0
gclient.py

@@ -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(),