Rohan Kankapurkar
Rohan Kankapurkar

Reputation: 125

Unable to sync home directory in Vagrant

This is the code I tried

config.vm.synced_folder ENV['HOME'], "/home/vagrant/myHome", :mount_options => ["dmode=777,fmode=777"]


 config.vm.synced_folder "~", "/home/vagrant/myHome", :mount_options => ["dmode=777,fmode=777"]

Upvotes: 2

Views: 1540

Answers (1)

Frederic Henri
Frederic Henri

Reputation: 53793

You should be able to get the user's home directory using ruby directly - Dir.home

config.vm.synced_folder "#{Dir.home}", "/home/vagrant/myHome" ...

should get the current user's directory (should work on Windows too)

Upvotes: 6

Related Questions