Commit b28f946b authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Merge pull request #2210 from mitchellh/b-set-e

provisioner/shell: set -e for inline [GH-2069]
parents 8ca8bd78 3ed73852
...@@ -94,7 +94,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { ...@@ -94,7 +94,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
} }
if p.config.InlineShebang == "" { if p.config.InlineShebang == "" {
p.config.InlineShebang = "/bin/sh" p.config.InlineShebang = "/bin/sh -e"
} }
if p.config.RawStartRetryTimeout == "" { if p.config.RawStartRetryTimeout == "" {
......
...@@ -66,8 +66,10 @@ Optional parameters: ...@@ -66,8 +66,10 @@ Optional parameters:
* `inline_shebang` (string) - The * `inline_shebang` (string) - The
[shebang](http://en.wikipedia.org/wiki/Shebang_%28Unix%29) value to use when [shebang](http://en.wikipedia.org/wiki/Shebang_%28Unix%29) value to use when
running commands specified by `inline`. By default, this is `/bin/sh`. running commands specified by `inline`. By default, this is `/bin/sh -e`.
If you're not using `inline`, then this configuration has no effect. If you're not using `inline`, then this configuration has no effect.
**Important:** If you customize this, be sure to include something like
the `-e` flag, otherwise individual steps failing won't fail the provisioner.
* `remote_path` (string) - The path where the script will be uploaded to * `remote_path` (string) - The path where the script will be uploaded to
in the machine. This defaults to "/tmp/script.sh". This value must be in the machine. This defaults to "/tmp/script.sh". This value must be
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment