Update install.py

This commit is contained in:
2025-10-15 20:06:19 +00:00
parent cdb882462a
commit 472218f33e

View File

@@ -1,22 +1,23 @@
import os import os
import sys import platform
is_linux = false
is_macos = false
is_windows = false
def check_os(): def check_os():
"""Checks the operating system and prints a message accordingly.""" os_type = platform.uname().sysname.lower()
os_type = os.uname().sysname.lower() is_linux = os_type == "linux"
is_macos = os_type == "darwin"
is_windows = os_type == "windows"
if os_type == "linux": if is_linux or is_macos or is_windows:
print("Running on Linux") print(f"Running on {os_type}")
elif os_type == "darwin":
print("Running on macOS")
else: else:
print(f"Unsupported OS family: {os_type}") print(f"Unsupported OS family: {os_type}")
return 1 # Indicate an error exit(1)
return 0 # Indicate success
if __name__ == "__main__": if __name__ == "__main__":
exit_code = check_os() check_os()
sys.exit(exit_code)