Use args setting for run option in trigger
This commit is contained in:
parent
8451cbf854
commit
4e5e4d0214
|
@ -169,9 +169,13 @@ module Vagrant
|
||||||
cmd = File.expand_path(config.path, @env.root_path)
|
cmd = File.expand_path(config.path, @env.root_path)
|
||||||
FileUtils.chmod("+x", cmd)
|
FileUtils.chmod("+x", cmd)
|
||||||
|
|
||||||
|
cmd << " #{config.args.join(' ' )}" if config.args
|
||||||
|
|
||||||
if Vagrant::Util::Platform.windows?
|
if Vagrant::Util::Platform.windows?
|
||||||
powershell_exe = Vagrant::Util::PowerShell.executable
|
powershell_exe = Vagrant::Util::PowerShell.executable
|
||||||
cmd = Shellwords.split("#{powershell_exe} #{config.powershell_args} #{cmd}")
|
cmd = Shellwords.split("#{powershell_exe} #{config.powershell_args} #{cmd}")
|
||||||
|
else
|
||||||
|
cmd = Shellwords.split(cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
@machine.ui.detail(I18n.t("vagrant.trigger.run.script", path: config.path))
|
@machine.ui.detail(I18n.t("vagrant.trigger.run.script", path: config.path))
|
||||||
|
|
|
@ -30,6 +30,10 @@ Can be any valid Vagrant command. It also accepts a special value `:all` which w
|
||||||
|
|
||||||
* `run_remote` (hash) - A collection of settings to run a inline or remote script with on the guest. These settings correspond to the [shell provosioner](/docs/provisioning/shell.html).
|
* `run_remote` (hash) - A collection of settings to run a inline or remote script with on the guest. These settings correspond to the [shell provosioner](/docs/provisioning/shell.html).
|
||||||
|
|
||||||
* `run` (hash) - A collection of settings to run a inline or remote script with on the host. These settings correspond to the [shell provosioner](/docs/provisioning/shell.html).
|
* `run` (hash) - A collection of settings to run a inline or remote script with on the host. These settings correspond to the [shell provosioner](/docs/provisioning/shell.html). However, at the moment the only settings `run` takes advantage of are:
|
||||||
|
+ `args`
|
||||||
|
+ `inline`
|
||||||
|
+ `path`
|
||||||
|
+ `powershell_args`
|
||||||
|
|
||||||
* `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.
|
||||||
|
|
Loading…
Reference in New Issue