简体   繁体   English

Ohai无法确定cygwin中的os_version

[英]Ohai fails to determine os_version in cygwin

I'm trying to run ohai.bat os_version within cygwin on Windows Server 2003 R2, and it returns an empty array as output. 我试图在Windows Server 2003 R2上的cygwin中运行ohai.bat os_version ,它返回一个空数组作为输出。 If I instead run ohai os_version in cmd.exe, then it correctly returns: 如果我改为在cmd.exe中运行ohai os_version ,则它将正确返回:

[
   "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. 鉴于ohai.bat os_version可在我的另一台虚拟机上运行,​​我倾向于认为这是某种形式的环境配置错误。 Does anyone have any ideas on what to check? 有人对检查什么有任何想法吗?

It turns out that the problem is caused by systemu not properly quoting directory names. 原来,问题是由systemu不能正确引用目录名称引起的。 This commit fixes the problem, but is not currently available in any released gem. 提交可解决此问题,但当前在任何已发布的gem中均不可用。 It will be in version 2.0.0 of systemu . 它将是systemu 2.0.0版本。 To fix it in your own project for now, you'll need to clone systemu off github and build the gem yourself. 现在要在您自己的项目中修复它,您需要从github克隆出systemu并自己构建gem。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM