From 8512d5707694a5b48a0d11561a45043c86d1d30f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 18 Apr 2014 20:46:02 -0700 Subject: [PATCH] commands/box/list: doesn't trigger Vagrantfile loading --- CHANGELOG.md | 1 + bin/vagrant | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e7af7f21..28265f4ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ IMPROVEMENTS: + - commands/box/list: Doesn't parse Vagrantfile. [GH-3502] - providers/hyperv: Implement the provision command. [GH-3494] BUG FIXES: diff --git a/bin/vagrant b/bin/vagrant index db3facda1..2354d15fa 100755 --- a/bin/vagrant +++ b/bin/vagrant @@ -24,7 +24,9 @@ end # 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| +argv.each_index do |i| + arg = argv[i] + if !arg.start_with?("-") if arg == "plugin" ENV["VAGRANT_NO_PLUGINS"] = "1" @@ -35,6 +37,10 @@ argv.each do |arg| ENV["VAGRANT_VAGRANTFILE"] = "plugin_command_#{Time.now.to_i}" end + if arg == "box" && argv[i+1] == "list" + ENV["VAGRANT_VAGRANTFILE"] = "plugin_command_#{Time.now.to_i}" + end + break end end