diff --git a/lib/train/platforms/detect/helpers/os_windows.rb b/lib/train/platforms/detect/helpers/os_windows.rb index 4b002b79..c32b6590 100644 --- a/lib/train/platforms/detect/helpers/os_windows.rb +++ b/lib/train/platforms/detect/helpers/os_windows.rb @@ -5,6 +5,10 @@ def detect_windows end def check_cmd + # we may get tricked by Windows Subsystem for Linux, so lets check: + res = @backend.run_command("which cmd.exe") + return false if res.exit_status == 0 + # try to detect windows, use cmd.exe to also support Microsoft OpenSSH res = @backend.run_command("cmd.exe /c ver")