fix broken system method in rake task

This commit is contained in:
Dan Bode
2012-10-14 00:57:14 -07:00
parent 7e6363e967
commit 5267491bbf

View File

@@ -4,14 +4,14 @@ require 'vagrant'
env = Vagrant::Environment.new(:cwd => File.dirname(__FILE__), :ui_class => Vagrant::UI::Colored) env = Vagrant::Environment.new(:cwd => File.dirname(__FILE__), :ui_class => Vagrant::UI::Colored)
def system (cmd) def cmd_system (cmd)
result = system cmd result = system cmd
raise(RuntimeError, $?) unless $?.success? raise(RuntimeError, $?) unless $?.success?
result result
end end
def on_box (box, cmd) def on_box (box, cmd)
system("vagrant ssh #{box} -c '#{cmd}'") cmd_system("vagrant ssh #{box} -c '#{cmd}'")
end end
# bring vagrant vm with image name up # bring vagrant vm with image name up
@@ -38,7 +38,7 @@ namespace :openstack do
desc 'clone all required modules' desc 'clone all required modules'
task :setup do task :setup do
system('librarian-puppet install') cmd_system('librarian-puppet install')
end end
task 'destroy' do task 'destroy' do