首页 > 解决方案 > Vagrant 在一台机器上将 WSL 视为 Linux(在其他地方将 WSL 视为 Windows)

问题描述

我们正在使用 Trellis 和 Vagrant 在 Windows 机器上配置开发人员 WordPress 实例(在 Linux 的 Windows 子系统内)。在一台机器上,我们遇到了很多问题,并且设法弄清楚该Vagrant::Util::Platform.platform变量mingw32在机器上设置为运行良好,但它设置linux-gnu在有问题的机器上。

进一步追溯到https://github.com/hashicorp/vagrant/blob/master/lib/vagrant/util/platform.rb似乎 VagrantRbConfig::CONFIG["host_os"]用来确定平台。

不知道从哪里开始——什么会导致 Ruby 在一台机器的 WSL 中报告 Linux,而在另一台机器的 WSL 中报告 Windows?

标签: rubyvagrantwindows-subsystem-for-linuxvagrant-windowstrellis

解决方案


推荐阅读