Recreate the Vagrant environment when required by WSL setup

This commit is contained in:
Chris Roberts 2017-05-12 13:14:04 -07:00
parent 3c44ce9742
commit fa2dd5b3fb
1 changed files with 5 additions and 1 deletions

View File

@ -121,7 +121,11 @@ begin
# some extra setup to allow access to Vagrant managed machines
# outside the subsystem
if Vagrant::Util::Platform.wsl?
Vagrant::Util::Platform.wsl_init(env, logger)
recreate_env = Vagrant::Util::Platform.wsl_init(env, logger)
if recreate_env
logger.info("Re-creating Vagrant environment due to WSL modifications.")
env = Vagrant::Environment.new(opts)
end
end
if !Vagrant.in_installer? && !Vagrant.very_quiet?