Only look for `Vagrantfile` if no more specific was given

This commit is contained in:
Mitchell Hashimoto 2013-02-23 11:59:44 -08:00
parent 082cc7f92d
commit 1bda157188
1 changed files with 4 additions and 2 deletions

View File

@ -82,8 +82,10 @@ module Vagrant
# Set the Vagrantfile name up. We append "Vagrantfile" and "vagrantfile" so that # Set the Vagrantfile name up. We append "Vagrantfile" and "vagrantfile" so that
# those continue to work as well, but anything custom will take precedence. # those continue to work as well, but anything custom will take precedence.
opts[:vagrantfile_name] ||= [] opts[:vagrantfile_name] ||= []
opts[:vagrantfile_name] = [opts[:vagrantfile_name]] if !opts[:vagrantfile_name].is_a?(Array) opts[:vagrantfile_name] = [opts[:vagrantfile_name]] if \
opts[:vagrantfile_name] += ["Vagrantfile", "vagrantfile"] !opts[:vagrantfile_name].is_a?(Array)
opts[:vagrantfile_name] = ["Vagrantfile", "vagrantfile"] if \
opts[:vagrantfile_name].empty?
# Set instance variables for all the configuration parameters. # Set instance variables for all the configuration parameters.
@cwd = opts[:cwd] @cwd = opts[:cwd]