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
platform.system is returning cli on Windows #311
Comments
I guess the question would be is there any code that is vital that looks at platform.system() instead of os.name or something? |
Seems like it's barely used anywhere and as far as I know the fact that it returns cli isn't used in the codebase. |
If it was running on Mono on Ubuntu vs .Net on Windows, would it actually have any way to distinguish? |
@elitest os.name = 'win32' on windows and 'posix' on Linux and macOS. So, we know at the point in platform.py that it checks, we can assume 'cli' means Windows. Linux and macOS have a os.uname implementation, so they will return the expected values. |
* Fix IronLanguages#311 Add check for sys.platform == 'cli' and set os to 'Windows'. * Remove workaround
platform.system()
is returningcli
on Windows butDarwin
on macOS. My take on it is that it should probably returnWindows
on Windows.For:
os.name == "posix"
)Against:
The text was updated successfully, but these errors were encountered: