Fix some issues with commands not referencing proper classes

This commit is contained in:
Mitchell Hashimoto 2012-04-19 14:02:03 -07:00
parent 1489854d70
commit 6161c04fcf
3 changed files with 8 additions and 6 deletions

View File

@ -32,10 +32,12 @@ module Vagrant
# If we reached this far then we must have a subcommand. If not, # If we reached this far then we must have a subcommand. If not,
# then we also just print the help and exit. # then we also just print the help and exit.
command_class = nil command_class = nil
Vagrant.plugin("1").registered.each do |plugin| if @sub_command
if plugin.command.has_key?(@sub_command.to_sym) Vagrant.plugin("1").registered.each do |plugin|
command_class = plugin.command.get(@sub_command.to_sym) if plugin.command.has_key?(@sub_command.to_sym)
break command_class = plugin.command.get(@sub_command.to_sym)
break
end
end end
end end

View File

@ -5,7 +5,7 @@ require 'vagrant/command/start_mixins'
module VagrantPlugins module VagrantPlugins
module CommandReload module CommandReload
class Command < Vagrant::Command::Base class Command < Vagrant::Command::Base
include StartMixins include Vagrant::Command::StartMixins
def execute def execute
options = {} options = {}

View File

@ -5,7 +5,7 @@ require 'vagrant/command/start_mixins'
module VagrantPlugins module VagrantPlugins
module CommandUp module CommandUp
class Command < Vagrant::Command::Base class Command < Vagrant::Command::Base
include StartMixins include Vagrant::Command::StartMixins
def execute def execute
options = {} options = {}