From 100e1f7eb04cbb534127b3f48df7075ae5f5d160 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 1 Jun 2012 15:10:26 +0200 Subject: [PATCH] Primary VMs are respected again. At some point in the past, primary VMs were no longer respected for commands. This fixes taht. --- lib/vagrant/command.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/command.rb b/lib/vagrant/command.rb index dc47ec73e..065cefd34 100644 --- a/lib/vagrant/command.rb +++ b/lib/vagrant/command.rb @@ -100,7 +100,11 @@ module Vagrant end # Make sure we're only working with one VM if single target - raise Errors::MultiVMTargetRequired if options[:single_target] && vms.length != 1 + if options[:single_target] && vms.length != 1 + vm = @env.primary_vm + raise Errors::MultiVMTargetRequired if !vm + vms = [vm] + end # If we asked for reversed ordering, then reverse it vms.reverse! if options[:reverse]