diff --git a/bin/vagrant b/bin/vagrant index 42c239f40..cd924873e 100755 --- a/bin/vagrant +++ b/bin/vagrant @@ -112,18 +112,18 @@ begin argv += argv_extra end - # If we are running with the Windows Subsystem for Linux do - # some extra setup to allow access to Vagrant managed machines - # outside the subsystem - if Vagrant::Util::Platform.wsl? - Vagrant::Util::Platform.wsl_init(logger) - end - # Create the environment, which is the cwd of wherever the # `vagrant` command was invoked from logger.debug("Creating Vagrant environment") env = Vagrant::Environment.new(opts) + # If we are running with the Windows Subsystem for Linux do + # 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) + end + if !Vagrant.in_installer? && !Vagrant.very_quiet? # If we're not in the installer, warn. env.ui.warn(I18n.t("vagrant.general.not_in_installer") + "\n", prefix: false)