provisioners/chef: disable color if Vagrant has no color [GH-2246]
This commit is contained in:
parent
502c3f6e37
commit
33dd881ad7
|
@ -17,6 +17,8 @@ BUG FIXES:
|
|||
retries. [GH-2234]
|
||||
- hosts/arch: Vagrant won't crash on Arch anymore. [GH-2233]
|
||||
- provisioners/ansibe: Extra vars are converted to strings. [GH-2244]
|
||||
- provisioners/chef: Propagate disabling color if Vagrant has no color
|
||||
enabled. [GH-2246]
|
||||
- provisioners/puppet: Work with restrictive umask. [GH-2241]
|
||||
|
||||
## 1.3.3 (September 18, 2013)
|
||||
|
|
|
@ -144,9 +144,19 @@ module VagrantPlugins
|
|||
@machine.ui.warn(I18n.t("vagrant.chef_run_list_empty"))
|
||||
end
|
||||
|
||||
options = [
|
||||
"-c #{@config.provisioning_path}/solo.rb",
|
||||
"-j #{@config.provisioning_path}/dna.json"
|
||||
]
|
||||
|
||||
if !@machine.env.ui.is_a?(Vagrant::UI::Colored)
|
||||
options << "--no-color"
|
||||
end
|
||||
|
||||
command_env = @config.binary_env ? "#{@config.binary_env} " : ""
|
||||
command_args = @config.arguments ? " #{@config.arguments}" : ""
|
||||
command = "#{command_env}#{chef_binary_path("chef-solo")} -c #{@config.provisioning_path}/solo.rb -j #{@config.provisioning_path}/dna.json #{command_args}"
|
||||
command = "#{command_env}#{chef_binary_path("chef-solo")} " +
|
||||
"#{options.join(" ")} #{command_args}"
|
||||
|
||||
@config.attempts.times do |attempt|
|
||||
if attempt == 0
|
||||
|
|
Loading…
Reference in New Issue