From e3e8f4f53794a1aa8f49758b8ab8065f486445c0 Mon Sep 17 00:00:00 2001
From: elijah <elijah@riseup.net>
Date: Fri, 8 Feb 2013 17:01:52 -0800
Subject: vagrant: pass through --yes to vagrant as --force

---
 lib/leap_cli/commands/vagrant.rb | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

(limited to 'lib')

diff --git a/lib/leap_cli/commands/vagrant.rb b/lib/leap_cli/commands/vagrant.rb
index 6df78e3..b4436af 100644
--- a/lib/leap_cli/commands/vagrant.rb
+++ b/lib/leap_cli/commands/vagrant.rb
@@ -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
 
-- 
cgit v1.2.3