Perform WSL check and init after environment is created

This commit is contained in:
Chris Roberts 2017-05-08 15:20:21 -07:00
parent 4df4f77bf6
commit 9a06374d29
1 changed files with 7 additions and 7 deletions

View File

@ -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)