diff --git a/ucompile b/ucompile index 92ed420..ecb0e16 100755 --- a/ucompile +++ b/ucompile @@ -13,7 +13,7 @@ def check_dependencies() -> None: for command in commands: if os.system(f"which {command} > /dev/null") != 0: - print(f"{Fore.RED}Error: {command} not found{Style.RESET_ALL}") + print(f"{Fore.ORANGE}WARNING: {command} not found{Style.RESET_ALL}") return @@ -123,13 +123,14 @@ def run_input_cases(program, args): def python_compile(file_name, args): try: - if subprocess.run(["which", "pypy3"]).returncode == 0: + if os.system("which pypy3 > /dev/null") == 0: + print(f"{Fore.LIGHTMAGENTA_EX}Using pypy3{Style.RESET_ALL}") run_input_cases("pypy3 " + file_name, args) return except Exception: pass - finally: - run_input_cases("python3 " + file_name, args) + print(f"{Fore.MAGENTA}WARNING: pypy3 not found, using python3 instead{Style.RESET_ALL}") + run_input_cases("python3 " + file_name, args) return