Slight cosmetic changes to get things working with emacs highlighter and commenting
This commit is contained in:
parent
c8e36274d6
commit
3e4a20d919
|
@ -203,11 +203,15 @@ module Vagrant
|
||||||
# probably (read: should be) set on the VM attribute, so we do
|
# probably (read: should be) set on the VM attribute, so we do
|
||||||
# nothing.
|
# nothing.
|
||||||
return if vm_name
|
return if vm_name
|
||||||
|
|
||||||
|
# Or, return if there is no root path set or the dotfile doesn't
|
||||||
|
# exist, since we can't do anything in that case anyways.
|
||||||
return if !root_path || !File.file?(dotfile_path)
|
return if !root_path || !File.file?(dotfile_path)
|
||||||
|
|
||||||
# Empty out previously loaded vms
|
# Empty out previously loaded vms
|
||||||
vms.clear
|
vms.clear
|
||||||
|
|
||||||
|
# Open and parse the dotfile
|
||||||
File.open(dotfile_path) do |f|
|
File.open(dotfile_path) do |f|
|
||||||
data = { :__vagrant => f.read }
|
data = { :__vagrant => f.read }
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,17 @@ module Vagrant
|
||||||
@vm = opts[:vm]
|
@vm = opts[:vm]
|
||||||
|
|
||||||
if !opts[:env].nil?
|
if !opts[:env].nil?
|
||||||
|
# We have an environment, so we create a new child environment
|
||||||
|
# specifically for this VM. This step will load any custom
|
||||||
|
# config and such.
|
||||||
@env = Vagrant::Environment.new({
|
@env = Vagrant::Environment.new({
|
||||||
:cwd => opts[:env].cwd,
|
:cwd => opts[:env].cwd,
|
||||||
:parent => opts[:env],
|
:parent => opts[:env],
|
||||||
:vm_name => opts[:vm_name],
|
:vm_name => opts[:vm_name],
|
||||||
:vm => self
|
:vm => self
|
||||||
}).load!
|
}).load!
|
||||||
|
|
||||||
|
# Load the associated system.
|
||||||
load_system!
|
load_system!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue