Permalink
Browse files

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

  • Loading branch information...
1 parent 082cc7f commit 1bda157188626938d2cd6616e2df1f8263a75b83 @mitchellh mitchellh committed Feb 23, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/vagrant/environment.rb
@@ -82,8 +82,10 @@ def initialize(opts=nil)
# 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]

0 comments on commit 1bda157

Please sign in to comment.