Update Environment#dotfile_path to take advantage of new Pathname object
This commit is contained in:
parent
fe593c88b8
commit
88fedb419e
|
@ -55,7 +55,7 @@ module Vagrant
|
|||
# The path to the `dotfile`, which contains the persisted UUID of
|
||||
# the VM if it exists.
|
||||
def dotfile_path
|
||||
root_path ? File.join(root_path, config.vagrant.dotfile_name) : nil
|
||||
root_path.join(config.vagrant.dotfile_name) rescue nil
|
||||
end
|
||||
|
||||
# The path to the home directory, which is usually in `~/.vagrant/~
|
||||
|
|
|
@ -54,7 +54,7 @@ class EnvironmentTest < Test::Unit::TestCase
|
|||
|
||||
context "dotfile path" do
|
||||
should "build up the dotfile out of the root path and the dotfile name" do
|
||||
assert_equal File.join(@env.root_path, @env.config.vagrant.dotfile_name), @env.dotfile_path
|
||||
assert_equal @env.root_path.join(@env.config.vagrant.dotfile_name), @env.dotfile_path
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue