From 2b37185994a0fa986469d05b00ed888fc8427cef Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 28 Feb 2013 22:32:13 -0800 Subject: [PATCH] Don't load plugins when using the `vagrant plugin` interface --- bin/vagrant | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/vagrant b/bin/vagrant index a51aaf8be..6da3eee11 100755 --- a/bin/vagrant +++ b/bin/vagrant @@ -34,6 +34,17 @@ else opts[:ui_class] = Vagrant::UI::Colored end +# This is kind of hacky, and I'd love to find a better way to do this, but +# if we're accessing the plugin interface, we want to NOT load plugins +# for this run, because they can actually interfere with the function +# of the plugin interface. +ARGV.each do |arg| + if !arg.start_with?("-") + ENV["VAGRANT_NO_PLUGINS"] = "1" if arg == "plugin" + break + end +end + env = nil begin # Create the environment, which is the cwd of wherever the