aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-02-08 17:01:52 -0800
committerelijah <elijah@riseup.net>2013-02-08 17:01:52 -0800
commite3e8f4f53794a1aa8f49758b8ab8065f486445c0 (patch)
tree26f3691862d934387b817b462967395d29909569
parent39e324a1d0a17f7811bbc955aad9d453ad296839 (diff)
downloadleap_cli-e3e8f4f53794a1aa8f49758b8ab8065f486445c0.tar.gz
leap_cli-e3e8f4f53794a1aa8f49758b8ab8065f486445c0.tar.bz2
vagrant: pass through --yes to vagrant as --force
-rw-r--r--lib/leap_cli/commands/vagrant.rb12
1 files changed, 10 insertions, 2 deletions
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