Last active
January 31, 2018 06:04
-
-
Save rydurham/a8c576b7ccff31c5d5f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'yaml' | |
VAGRANTFILE_API_VERSION = "2" | |
homesteadYamlPath = File.expand_path("~/.homestead/Homestead.yaml") | |
afterScriptPath = File.expand_path("~/.homestead/after.sh") | |
aliasesPath = File.expand_path("~/.homestead/aliases") | |
require_relative 'scripts/homestead.rb' | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
if File.exists? aliasesPath then | |
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases" | |
end | |
config.vm.provider "virtualbox" do |v| | |
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] | |
end | |
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath))) | |
if File.exists? afterScriptPath then | |
config.vm.provision "shell", path: afterScriptPath | |
end | |
end |
Placed
config.vm.synced_folder "/Users/galenhan/Code", "/home/vagrant/Code", type: "rsync", rsync__args: ["--verbose", "--archive", "--delete", "-z"]
at the end of the config block, which successfully allows symlinks. However, files do not instantly sync between host and guest machine :/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doesn't seem to work on the latest Homestead :(