From dc4f6e1939647c471294e0328468a0c2d6da9e44 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 6 May 2012 09:54:23 -0700 Subject: [PATCH] Allow creating multiple easy commands --- lib/vagrant/easy/command_base.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/vagrant/easy/command_base.rb b/lib/vagrant/easy/command_base.rb index 4e5b4856e..7e1a40ccd 100644 --- a/lib/vagrant/easy/command_base.rb +++ b/lib/vagrant/easy/command_base.rb @@ -5,9 +5,6 @@ module Vagrant # Base class for all easy commands. This contains the basic code # that knows how to run the easy commands. class CommandBase < Vagrant::Command::Base - @command = nil - @runner = nil - # This is called by the {EasyCommand.create} method when creating # an easy command to set the invocation command. def self.configure(name, &block) @@ -18,7 +15,9 @@ module Vagrant def initialize(*args, &block) super - @logger = Log4r::Logger.new("vagrant::easy_command::#{@command}") + @command = self.class.instance_variable_get(:@command) + @runner = self.class.instance_variable_get(:@runner) + @logger = Log4r::Logger.new("vagrant::easy_command::#{@command}") end def execute