diff --git a/lib/vagrant/cli.rb b/lib/vagrant/cli.rb index 71bc1e7ea..1c1f5126d 100644 --- a/lib/vagrant/cli.rb +++ b/lib/vagrant/cli.rb @@ -32,10 +32,12 @@ module Vagrant # If we reached this far then we must have a subcommand. If not, # then we also just print the help and exit. command_class = nil - Vagrant.plugin("1").registered.each do |plugin| - if plugin.command.has_key?(@sub_command.to_sym) - command_class = plugin.command.get(@sub_command.to_sym) - break + if @sub_command + Vagrant.plugin("1").registered.each do |plugin| + if plugin.command.has_key?(@sub_command.to_sym) + command_class = plugin.command.get(@sub_command.to_sym) + break + end end end diff --git a/plugins/command_reload/command.rb b/plugins/command_reload/command.rb index b2bdbccff..6e96f183d 100644 --- a/plugins/command_reload/command.rb +++ b/plugins/command_reload/command.rb @@ -5,7 +5,7 @@ require 'vagrant/command/start_mixins' module VagrantPlugins module CommandReload class Command < Vagrant::Command::Base - include StartMixins + include Vagrant::Command::StartMixins def execute options = {} diff --git a/plugins/command_up/command.rb b/plugins/command_up/command.rb index 1b3fcbeaf..8502d195d 100644 --- a/plugins/command_up/command.rb +++ b/plugins/command_up/command.rb @@ -5,7 +5,7 @@ require 'vagrant/command/start_mixins' module VagrantPlugins module CommandUp class Command < Vagrant::Command::Base - include StartMixins + include Vagrant::Command::StartMixins def execute options = {}