Docs: Add note about running bash with the `run` option for triggers
This commit is contained in:
parent
b3462d805b
commit
f69bdc4bb6
|
@ -74,6 +74,18 @@ The trigger class takes various options.
|
||||||
+ `inline`
|
+ `inline`
|
||||||
+ `path`
|
+ `path`
|
||||||
|
|
||||||
|
**Note:** The `run` option with `inline` is not entirely like a shell provisioner that runs bash.
|
||||||
|
It executes binaries on your machine rather than a bash script. If you wish you use
|
||||||
|
bash to pipe some text to a file in your `run` option with `inline`, wrap
|
||||||
|
your inline script with _`bash -c "<script goes here>"`_. For example:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
config.trigger.after :up do |trigger|
|
||||||
|
trigger.info = "More information"
|
||||||
|
trigger.run = {inline: "bash -c 'echo \"hey there!!\" > file.txt'"}
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
* `warn` (string) - A warning message that will be printed at the beginning of a trigger.
|
* `warn` (string) - A warning message that will be printed at the beginning of a trigger.
|
||||||
|
|
||||||
* `exit_codes` (integer, array) - A set of acceptable exit codes to continue on. Defaults to `0` if option is absent. For now only valid with the `run` option.
|
* `exit_codes` (integer, array) - A set of acceptable exit codes to continue on. Defaults to `0` if option is absent. For now only valid with the `run` option.
|
||||||
|
|
Loading…
Reference in New Issue