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:
Mitchell Hashimoto 2013-07-07 17:47:25 -07:00
commit b25bed634f
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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