mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
move is_env_cog to a dedicated helper function in gclient_util module
So that it can be shared with code other than scm. Bug: 339231299 Change-Id: Iba68cc7ebba78c8933598d073861290bb0157c40 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5529883 Auto-Submit: Yiwei Zhang <yiwzhang@google.com> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
@@ -1201,6 +1201,11 @@ def RunEditor(content, git, git_editor=None):
|
||||
os.remove(filename)
|
||||
|
||||
|
||||
def IsEnvCog():
|
||||
"""Returns whether the command is running in a Cog environment."""
|
||||
return os.getcwd().startswith('/google/cog/cloud')
|
||||
|
||||
|
||||
def UpgradeToHttps(url):
|
||||
"""Upgrades random urls to https://.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user