File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ VAGRANTFILE_API_VERSION = "2"
5
5
confDir = $confDir ||= File . expand_path ( "./config" )
6
6
7
7
homesteadYamlPath = confDir + "/Homestead.yaml"
8
+ homesteadJsonPath = confDir + "/Homestead.json"
8
9
afterScriptPath = confDir + "/after.sh"
9
10
aliasesPath = confDir + "/aliases"
10
11
@@ -15,7 +16,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
15
16
config . vm . provision "file" , source : aliasesPath , destination : "~/.bash_aliases"
16
17
end
17
18
18
- Homestead . configure ( config , YAML ::load ( File . read ( homesteadYamlPath ) ) , Vagrant . has_plugin? ( 'vagrant-hostsupdater' ) )
19
+ if File . exists? homesteadYamlPath then
20
+ Homestead . configure ( config , YAML ::load ( File . read ( homesteadYamlPath ) ) , Vagrant . has_plugin? ( 'vagrant-hostsupdater' ) )
21
+ elsif File . exists? homesteadJsonPath then
22
+ Homestead . configure ( config , JSON . parse ( File . read ( homesteadJsonPath ) ) , Vagrant . has_plugin? ( 'vagrant-hostsupdater' ) )
23
+ end
24
+
19
25
20
26
if File . exists? afterScriptPath then
21
27
config . vm . provision "shell" , path : afterScriptPath
You can’t perform that action at this time.
0 commit comments