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

Unified Diff: recipe_modules/git/api.py

Issue 2192163002: Make git recipe api add depot_tools to PATH (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Use package_repo_resource Created 4 years, 5 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 | recipe_modules/git/example.expected/basic.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/git/api.py
diff --git a/recipe_modules/git/api.py b/recipe_modules/git/api.py
index 00524b9622ce700cb871d6e221cbc411318124f4..c2d4eb06ddf117c3854acdd969c2876561ae6d4a 100644
--- a/recipe_modules/git/api.py
+++ b/recipe_modules/git/api.py
@@ -208,11 +208,16 @@ class GitApi(recipe_api.RecipeApi):
self.resource('git_setup.py'),
git_setup_args)
+ # Some of the commands below require depot_tools to be in PATH.
+ path = self.m.path.pathsep.join([
+ str(self.package_repo_resource()), '%(PATH)s'])
nodir 2016/07/29 17:41:50 does %(PATH)s work? I don't know what expands it
borenet 2016/07/29 18:56:01 Yeah, must be the recipe engine. We use it in a c
+
if use_git_cache:
self('retry', 'cache', 'fetch', '-c', self.m.path['git_cache'],
cwd=dir_path,
name='fetch cache',
- can_fail_build=can_fail_build)
+ can_fail_build=can_fail_build,
+ env={'PATH': path})
# There are five kinds of refs we can be handed:
# 0) None. In this case, we default to properties['branch'].
@@ -246,7 +251,7 @@ class GitApi(recipe_api.RecipeApi):
if recursive:
fetch_args.append('--recurse-submodules')
- fetch_env = {}
+ fetch_env = {'PATH': path}
fetch_stderr = None
if curl_trace_file:
fetch_env['GIT_CURL_VERBOSE'] = '1'
« no previous file with comments | « no previous file | recipe_modules/git/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698