79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
# File 'lib/vagrant/provisioners/shell.rb', line 79
def provision!
args = ""
args = " #{config.args}" if config.args
command = "chmod +x #{config.upload_path} && #{config.upload_path}#{args}"
with_script_file do |path|
env[:vm].channel.upload(path.to_s, config.upload_path)
env[:vm].channel.sudo(command) do |type, data|
if [:stderr, :stdout].include?(type)
color = type == :stdout ? :green : :red
env[:ui].info(data.chomp, :color => color, :prefix => false)
end
end
end
end
|