another place (the root place where he reads ENV variables) is in shared_helpers.rb, line 71 (vagrant v 1.6.5):
# This returns the path to the ~/.vagrant.d folder where Vagrant's # per-user state is stored. # # @return [Pathname] def self.user_data_path # Use user spcified env var if available path = ENV["VAGRANT_HOME"] # On Windows, we default to the USERPROFILE directory if it # is available. This is more compatible with Cygwin and sharing # the home directory across shells. if !path && ENV["USERPROFILE"] path = "#{ENV["USERPROFILE"]}/.vagrant.d" end # Fallback to the default path ||= "~/.vagrant.d" Pathname.new(path).expand_path end
In any case, I think the best way is to use the environment variable VAGRANT_HOME in case of updating the stray version.
You can use this function, for example:
disk_path = self.user_data_path().to_s
Christophe Sep 09 '14 at 7:24 2014-09-09 07:24
source share