Disabe puppet colors if UI has colors disabled [GH-1344]

This commit is contained in:
Mitchell Hashimoto 2013-07-18 00:16:53 -04:00
parent ecc908956a
commit 87455b5d0a
3 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,7 @@ IMPROVEMENTS:
- Remote commands that fail will now show the stdout/stderr of the
command that failed. [GH-1203]
- Puppet will run without color if the UI is not colored. [GH-1344]
BUG FIXES:

View File

@ -97,6 +97,10 @@ module VagrantPlugins
options << "--hiera_config=#{@hiera_config_path}"
end
if !@machine.env.ui.is_a?(Vagrant::UI::Colored)
options << "--no-color"
end
options << "--detailed-exitcodes"
options << @manifest_file
options = options.join(" ")

View File

@ -40,6 +40,12 @@ module VagrantPlugins
# Add the certname option if there is one
options += ["--certname", cn] if cn
# Disable colors if we must
if !@machine.env.ui.is_a?(Vagrant::UI::Colored)
options << "--no-color"
end
options = options.join(" ")
# Build up the custom facts if we have any