vagrant: Ensure host's code path is set correctly

You can run `vagrant up` from any directory within a project--vagrant
will look for a Vagrantfile in the current directory and if it doesn't
find one walk up one directory, and repeat until it finds a Vagrantfile.
Previously the `code_share_host_path` was set assuming that `vagrant up`
would always be run from the root reddit directory. Now it is set from the
fixed known location of the Vagrantfile.
This commit is contained in:
Brian Simpson
2016-02-11 10:06:52 -08:00
parent 9dd31e5c10
commit c6c2f09427

4
Vagrantfile vendored
View File

@@ -48,7 +48,9 @@
vagrant_user = "vagrant"
# code directories
code_share_host_path = "../"
this_path = File.absolute_path(__FILE__)
reddit_dir = File.expand_path("..", this_path)
code_share_host_path = File.expand_path("..", reddit_dir)
code_share_guest_path = "/media/reddit_code"
plugins = ["meatspace", "about", "liveupdate", "adzerk", "donate", "gold"]