From 6f852b4dc4f5c84fadafdfaa611af0b80a467b60 Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Sun, 11 Feb 2024 23:47:02 -0700 Subject: [PATCH] cli_launcher: Keep launcher running while executing command os.execv is sketchy on Windows, make it a little more tolerable --- cli_launcher.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli_launcher.py b/cli_launcher.py index 165d1bd..bea7592 100755 --- a/cli_launcher.py +++ b/cli_launcher.py @@ -115,8 +115,7 @@ def update_venv() -> None: def main(): """The main function.""" update_venv() - algobowl = venv_cmd("algobowl") - os.execv(venv_cmd("algobowl"), sys.argv) + sys.exit(subprocess.run([venv_cmd("algobowl")] + sys.argv[1:]).returncode) if __name__ == "__main__":