Skip to content

Commit

Permalink
fix: check whether script is running on Windows before everything else
Browse files Browse the repository at this point in the history
  • Loading branch information
lvillani committed Dec 8, 2024
1 parent 56435dd commit 0b9086d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions script/run-in-vsenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b9086d

Please sign in to comment.