From fa2dd5b3fb7eb6f6f9d47d4c36304a34afa78655 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Fri, 12 May 2017 13:14:04 -0700 Subject: [PATCH] Recreate the Vagrant environment when required by WSL setup --- bin/vagrant | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/vagrant b/bin/vagrant index cd924873e..19df75033 100755 --- a/bin/vagrant +++ b/bin/vagrant @@ -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?