Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2059)

Unified Diff: gclient_utils.py

Issue 472553003: Allow chromium buildtools path to be overriden in the environment. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Fix my poor python. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index f0d8cec6f49cb99637af1c11ac8e5e54d5ef8bb1..e8d916e78d5d2a8aeba4cbf61bebf7b64ad79084 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -658,6 +658,13 @@ def GetMacWinOrLinux():
def GetBuildtoolsPath():
"""Returns the full path to the buildtools directory.
This is based on the root of the checkout containing the current directory."""
+
+ # Overriding the build tools path by environment is highly unsupported and may
+ # break without warning. Do not rely on this for anything important.
+ override = os.environ.get('CHROMIUM_BUILDTOOLS_PATH')
+ if override is not None:
+ return override
+
gclient_root = FindGclientRoot(os.getcwd())
if not gclient_root:
# Some projects might not use .gclient. Try to see whether we're in a git
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698