]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
vagrant: pass through --yes to vagrant as --force
authorelijah <elijah@riseup.net>
Sat, 9 Feb 2013 01:01:52 +0000 (17:01 -0800)
committerelijah <elijah@riseup.net>
Sat, 9 Feb 2013 01:01:52 +0000 (17:01 -0800)
lib/leap_cli/commands/vagrant.rb

index 6df78e37852537806a23dc84cf3716019e3a1b93..b4436afeb601f2762da846f0ae4cb4e6d17282d8 100644 (file)
@@ -18,7 +18,11 @@ module LeapCli; module Commands
     local.arg_name 'node-filter', :optional => true #, :multiple => false
     local.command :stop do |stop|
       stop.action do |global_options,options,args|
-        vagrant_command("halt", args)
+        if global_options[:yes]
+          vagrant_command("halt --force", args)
+        else
+          vagrant_command("halt", args)
+        end
       end
     end
 
@@ -26,7 +30,11 @@ module LeapCli; module Commands
     local.arg_name 'node-filter', :optional => true #, :multiple => false
     local.command :destroy do |destroy|
       destroy.action do |global_options,options,args|
-        vagrant_command("destroy", args)
+        if global_options[:yes]
+          vagrant_command("destroy --force", args)
+        else
+          vagrant_command("destroy", args)
+        end
       end
     end