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?
It turns out that the problem is caused by
systemunot 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 clonesystemuoff github and build the gem yourself.