Chromium Code Reviews| Index: recipe_modules/step/api.py |
| diff --git a/recipe_modules/step/api.py b/recipe_modules/step/api.py |
| index ce22841e74be7455ce78aa198edda3109f825f15..ec83518d5f963a27c81a12d79ef8ab54381e7eb0 100644 |
| --- a/recipe_modules/step/api.py |
| +++ b/recipe_modules/step/api.py |
| @@ -171,12 +171,8 @@ class StepApi(recipe_api.RecipeApiPlain): |
| if cwd and cwd == self.m.path['start_dir']: |
| cwd = None |
| - env = self.m.context.env |
| - if self._prefix_path: |
| - ps = self.m.path.pathsep |
| - prefix = ps.join(self._prefix_path) |
| - suffix = env.get('PATH', '%(PATH)s') |
| - env['PATH'] = '%s%s%s' % (prefix, ps, suffix) |
| + with self.m.context(env_prefixes={'PATH': self._prefix_path}): |
| + env_prefixes = self.m.context.env_prefixes |
| if ok_ret in ('any', 'all'): |
| ok_ret = range(-256, 256) |
| @@ -186,7 +182,9 @@ class StepApi(recipe_api.RecipeApiPlain): |
| base_name=full_name or name, |
| cmd=cmd, |
| cwd=cwd, |
| - env=env, |
| + env=self.m.context.env, |
| + env_prefixes=env_prefixes, |
|
iannucci
2017/06/13 20:28:12
tuple(env_prefixen, pathsep)
dnj
2017/06/13 21:46:26
Done.
|
| + pathsep=self.m.path.pathsep, |
| allow_subannotations=bool(allow_subannotations), |
| trigger_specs=[self._make_trigger_spec(trig) |
| for trig in (trigger_specs or ())], |