From 472218f33e0308a36c703c34c51993e1e95af2f2 Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 15 Oct 2025 20:06:19 +0000 Subject: [PATCH] Update install.py --- install.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/install.py b/install.py index 6ec0f47..4170e68 100644 --- a/install.py +++ b/install.py @@ -1,22 +1,23 @@ import os -import sys +import platform + +is_linux = false +is_macos = false +is_windows = false 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": - print("Running on Linux") - elif os_type == "darwin": - print("Running on macOS") + if is_linux or is_macos or is_windows: + print(f"Running on {os_type}") else: print(f"Unsupported OS family: {os_type}") - return 1 # Indicate an error - - return 0 # Indicate success + exit(1) if __name__ == "__main__": - exit_code = check_os() - sys.exit(exit_code) + check_os()