get_toolchain: Fix platform detection (#582)

This commit is contained in:
Patrick Huesmann 2021-11-29 14:41:41 +01:00 committed by GitHub
parent a4c866f35c
commit 51203d7f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,11 +18,11 @@ else:
def platform():
if 'linux' in sys.platform:
return 'linux'
return 'Linux'
elif 'darwin' in sys.platform:
return 'mac'
return 'macOS'
elif 'win' in sys.platform or 'msys' in sys.platform:
return 'windows'
return 'Windows'
else:
return sys.platform
@ -108,14 +108,6 @@ def main(argv):
plat = platform()
print("Platform:", plat)
if os.environ.get('CI', False):
platforms = {
"windows": "Windows",
"linux": "Linux",
"mac": "macOS"
}
plat = platforms[plat]
to_download = []
for asset in toolchain_data['assets']: