Ohai 无法确定 cygwin 中的 os_version
我尝试在 Windows Server 2003 R2 上的 cygwin 中运行 ohai.bat os_version
,它返回一个空数组作为输出。如果我在 cmd.exe 中运行 ohai os_version
,那么它会正确返回:
[
"5.2.3790"
]
鉴于 ohai.bat os_version
在我的另一台虚拟机上运行,我倾向于相信这是某种形式的环境配置错误。有人知道要检查什么吗?
I'm trying to run ohai.bat os_version
within cygwin on Windows Server 2003 R2, and it returns an empty array as output. If I instead run ohai os_version
in cmd.exe, then it correctly returns:
[
"5.2.3790"
]
Given that ohai.bat os_version
works on another one of my virtual machines, I'm inclined to believe that this is an environment misconfiguration of some form. Does anyone have any ideas on what to check?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,该问题是由于
systemu
未正确引用目录名称引起的。此 提交修复了问题,但目前在任何已发布的 gem 中都不可用。它将是systemu
的 2.0.0 版本。现在要在您自己的项目中修复它,您需要从 github 克隆systemu
并自行构建 gem。It turns out that the problem is caused by
systemu
not properly quoting directory names. This commit fixes the problem, but is not currently available in any released gem. It will be in version 2.0.0 ofsystemu
. To fix it in your own project for now, you'll need to clonesystemu
off github and build the gem yourself.