| Index: recipe_modules/context/examples/full.py
|
| diff --git a/recipe_modules/context/examples/full.py b/recipe_modules/context/examples/full.py
|
| index 960ef0ee6a63bb2fc7943b1416be1dcb57080eef..3f876960cfca14a924048f44613e000450c02914 100644
|
| --- a/recipe_modules/context/examples/full.py
|
| +++ b/recipe_modules/context/examples/full.py
|
| @@ -21,14 +21,20 @@ def RunSteps(api):
|
| api.step('default step', ['bash', '-c', 'echo default!'])
|
|
|
| # can change cwd
|
| - api.step('mk subdir', ['mkdir', 'subdir'])
|
| + api.step('mk subdir', ['mkdir', '-p', 'subdir'])
|
| with api.context(cwd=api.path['start_dir'].join('subdir')):
|
| api.step('subdir step', ['bash', '-c', 'pwd'])
|
| api.step('other subdir step', ['bash', '-c', 'echo hi again!'])
|
|
|
| - # can set envvars
|
| - with api.context(env={'HELLO': 'WORLD', 'HOME': None}):
|
| - api.step('env step', ['bash', '-c', 'echo $HELLO; echo $HOME'])
|
| + # can set envvars, and path prefix.
|
| + with api.context(env={'FOO': 'bar'}):
|
| + api.step('env step', ['bash', '-c', 'echo $FOO'])
|
| +
|
| + pants = api.path['start_dir'].join('pants')
|
| + shirt = api.path['start_dir'].join('shirt')
|
| + with api.context(env={'FOO': api.context.Prefix(pants, shirt)}):
|
| + api.step('env step with prefix',
|
| + ['bash', '-c', 'echo $FOO'])
|
|
|
| # %-formats are errors (for now). Double-% escape them.
|
| bad_examples = ['%format', '%s']
|
|
|