-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Train fails on Windows Subsystem for Linux #520
Comments
I already know whats the root cause and think of a solution: The root cause is that we at first try to detect windows and this works because of strange behavior of the WIndows Subsystem for Linux. The issue is located in:
the run of "cmd.exe" strangely works, resulting in switching context to the windows cmd.exe. We need some additional check to detect the Windows subsystem for Linux. |
Signed-off-by: christian-wtd <[email protected]>
For those arguing WSL is not a supported platform, the provide 3 lines of code make inspec working well as far as I can check instead of breaking immediately. |
Version:
Inspec: 4.16
Train: 3.0.3 (latest available on rubygems.org)
Environment:
Windows 10, Subsystem for Linux, Debian
Scenario:
Inspec is not working because OS detection detects Windows and fails because it should run linux commands. I already traced the issue down to the train gem.
Steps to Reproduce:
Start Debian for Windows 10, run any inspec cli or any library function which requires OS detection.
Expected Result:
Inspec correctly detects the Windows Subsystem for Linux
Actual Result:
The text was updated successfully, but these errors were encountered: