From db76b42ef50703d218aeccee15b0ab10f5621724 Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Sat, 9 Jun 2012 22:56:54 -0700 Subject: [PATCH] Allow the .vagrant dotfile to be moved into a completely different directory tree I wanted to define my dotfile as: `config.vagrant.dotfile_name = "~/.vagrant-projectname"` and noticed that the full path wasn't expanded as expected. This patch allows the vagrant file to be placed anywhere on the filesystem. --- lib/vagrant/environment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index eaed02cea..11949cb1d 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -115,7 +115,7 @@ module Vagrant # @return [Pathname] def dotfile_path return nil if !root_path - root_path.join(config.global.vagrant.dotfile_name) + root_path.join(File.expand_path(config.global.vagrant.dotfile_name)) end # Returns the collection of boxes for the environment.