From 0b9086d9cf6d47ef5d90c2a202b6cc64c03f9aab Mon Sep 17 00:00:00 2001 From: Lorenzo Villani Date: Sun, 8 Dec 2024 15:25:03 +0100 Subject: [PATCH] fix: check whether script is running on Windows before everything else --- script/run-in-vsenv.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/run-in-vsenv.py b/script/run-in-vsenv.py index 0fe1da1..47240c9 100755 --- a/script/run-in-vsenv.py +++ b/script/run-in-vsenv.py @@ -53,14 +53,14 @@ class Args: def main(): args, rest = parse_args() - if not rest: - print("Must specify a command to run inside the Visual Studio environment.") - sys.exit(1) - if not is_windows(): print("This script only works on Windows.") sys.exit(1) + if not rest: + print("Must specify a command to run inside the Visual Studio environment.") + sys.exit(1) + if not "COMSPEC" in os.environ: print("COMSPEC environment variable is not defined, cannot proceed.") sys.exit(1)