From: elijah Date: Sat, 9 Feb 2013 01:01:52 +0000 (-0800) Subject: vagrant: pass through --yes to vagrant as --force X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=e3e8f4f53794a1aa8f49758b8ab8065f486445c0;p=leap%2Fleap_cli.git vagrant: pass through --yes to vagrant as --force --- 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