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

Unified Diff: recipe_modules/step/api.py

Issue 2886903004: Revert of [recipe_modules/step] do not set cwd if it is start_dir. (Closed)
Patch Set: Created 3 years, 7 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/step/example.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/step/api.py
diff --git a/recipe_modules/step/api.py b/recipe_modules/step/api.py
index cc7e9958d504ede45b2ead18114a09a9bea57f94..f9b7a52e6b2776f95e5ea93c30135a091bbd2ab7 100644
--- a/recipe_modules/step/api.py
+++ b/recipe_modules/step/api.py
@@ -153,6 +153,7 @@
command wrapper.
timeout: If supplied, the recipe engine will kill the step after the
specified number of seconds.
+ cwd (str or None): absolute path to working directory for the command
allow_subannotations (bool): if True, lets the step emit its own
annotations. NOTE: Enabling this can cause some buggy behavior. Please
strongly consider using step_result.presentation instead. If you have
@@ -214,9 +215,8 @@
name = "%s (%d)" % (name, step_count)
self._seen_steps.add(full_name)
- cwd = self.get_from_context('cwd')
- if cwd is not None and cwd != self.m.path['start_dir']:
- kwargs['cwd'] = cwd
+ if 'cwd' not in kwargs:
+ kwargs['cwd'] = self.get_from_context('cwd')
kwargs['env'] = self.get_from_context('env', {})
if self._prefix_path:
ps = self.m.path.pathsep
« no previous file with comments | « no previous file | recipe_modules/step/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698