Merge pull request #133 from ubermuda/provisioner/shell/script-execution
provisioner/shell: execute script directly instead of using /bin/sh
This commit is contained in:
commit
b25bed634f
|
@ -62,7 +62,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
|
|||
}
|
||||
|
||||
if p.config.ExecuteCommand == "" {
|
||||
p.config.ExecuteCommand = "{{.Vars}} sh {{.Path}}"
|
||||
p.config.ExecuteCommand = "chmod +x {{.Path}}; {{.Vars}} {{.Path}}"
|
||||
}
|
||||
|
||||
if p.config.Inline != nil && len(p.config.Inline) == 0 {
|
||||
|
|
|
@ -51,7 +51,7 @@ Optional parameters:
|
|||
`key=value`.
|
||||
|
||||
* `execute_command` (string) - The command to use to execute the script.
|
||||
By default this is `{{ .Vars }} sh {{ .Path }}`. The value of this is
|
||||
By default this is `chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}`. The value of this is
|
||||
treated as [configuration template](/docs/templates/configuration-
|
||||
templates.html). There are two available variables: `Path`, which is
|
||||
the path to the script to run, and `Vars`, which is the list of
|
||||
|
|
Loading…
Reference in New Issue