From 1bda157188626938d2cd6616e2df1f8263a75b83 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 23 Feb 2013 11:59:44 -0800 Subject: [PATCH] Only look for `Vagrantfile` if no more specific was given --- lib/vagrant/environment.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index 0399a5041..9b8eabbe2 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -82,8 +82,10 @@ module Vagrant # Set the Vagrantfile name up. We append "Vagrantfile" and "vagrantfile" so that # those continue to work as well, but anything custom will take precedence. opts[:vagrantfile_name] ||= [] - opts[:vagrantfile_name] = [opts[:vagrantfile_name]] if !opts[:vagrantfile_name].is_a?(Array) - opts[:vagrantfile_name] += ["Vagrantfile", "vagrantfile"] + opts[:vagrantfile_name] = [opts[:vagrantfile_name]] if \ + !opts[:vagrantfile_name].is_a?(Array) + opts[:vagrantfile_name] = ["Vagrantfile", "vagrantfile"] if \ + opts[:vagrantfile_name].empty? # Set instance variables for all the configuration parameters. @cwd = opts[:cwd]