ruby - 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?
解决方案
推荐阅读
- java - 如何使用 selenium 多次运行同一个类
- javascript - 在 JavaScript 中创建 onclick 类的新实例的正确方法是什么?
- c# - 部分类在内部与常规类不同吗?
- java - 使用带有thymeleaf的spring boot在java中将用户添加到数据库的问题
- csv - 将 CSV 读取到 Neo4j,每列和关系创建一个节点
- java - 如何在 IntelliJ 文档中显示类的公共方法?
- javascript - 为什么 import 关键字在 react 中起作用,而不是在普通的 npm init 项目中?
- reactjs - React DataGrid 列显示隐藏
- python - builtin_function_or_method' 对象不能使用 os.walk 进行迭代
- javascript - 当我尝试从 package.json 安装包时,NPM 崩溃