From fd9ad904fe09c37a769fe9561c09b77b5512bb25 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 1 Jun 2012 15:59:05 +0200 Subject: [PATCH] Easy commands now take a target VM name It is assumed to be the first arg, as long as the first arg doesn't begin as a flag "-foo" --- lib/vagrant/easy/command_base.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/easy/command_base.rb b/lib/vagrant/easy/command_base.rb index 85a19ba22..0df8de78c 100644 --- a/lib/vagrant/easy/command_base.rb +++ b/lib/vagrant/easy/command_base.rb @@ -59,9 +59,14 @@ module Vagrant # halt our own execution here. return 0 if !argv + # The Multi-VM argument is the first argument as long as the + # first argument is not a flag. + names = nil + names = argv[0] if argv[0] !~ /^-/ + # Run the action for each VM. @logger.info("Running easy command: #{@command}") - with_target_vms do |vm| + with_target_vms(names) do |vm| @logger.debug("Running easy command for VM: #{vm.name}") @runner.call(CommandAPI.new(vm, argv)) end