Skip to content

Commit 3d266ec

Browse files
authored
Fix #590: Systeminfo doesn't resolve Windows correctly (#592)
This PR is to fix issue #590. It includes the platform module to resolve the OS type correctly. This enables tests running againt `WinRM` to behave correctly if a MSYS2 is installed on the windows system. It was tested against the current test suite. Resolves: #590
1 parent d40f6ef commit 3d266ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testinfra/modules/systeminfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def sysinfo(self):
2929
"arch": None,
3030
}
3131
uname = self.run_expect([0, 1], 'uname -s')
32-
if uname.rc == 1:
32+
if uname.rc == 1 or uname.stdout.lower().startswith("msys"):
3333
# FIXME: find a better way to detect windows here
3434
sysinfo.update(**self._get_windows_sysinfo())
3535
return sysinfo

0 commit comments

Comments
 (0)