Browse Source

Add cog/ cwd for fetch.

Bug: 1354709, b/242209562

Change-Id: I48b5575c7a4b8855a8b1f95ced24acadaea39a59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3865737
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Joanna Wang 3 years ago
parent
commit
b415544db4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      fetch.py

+ 2 - 1
fetch.py

@@ -262,7 +262,8 @@ def run(options, spec, root):
 
 
   # Use sso:// by default if the env is cog
   # Use sso:// by default if the env is cog
   if not options.protocol_override and \
   if not options.protocol_override and \
-    os.getcwd().startswith('/google/src/cloud'):
+    (any(os.getcwd().startswith(x) for x in [
+        '/google/src/cloud', '/google/cog/cloud'])):
     options.protocol_override = 'sso'
     options.protocol_override = 'sso'
 
 
   # Update solutions with protocol_override field
   # Update solutions with protocol_override field