From 9f7f7287d3c85765cfb147a8ea20de46c3664f63 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Thu, 1 Apr 2021 20:20:33 -0500 Subject: [PATCH] Moved version check above directory check. --- scripts/gen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/gen.py b/scripts/gen.py index e8865e1..5a34e22 100644 --- a/scripts/gen.py +++ b/scripts/gen.py @@ -15,13 +15,14 @@ BUILDTOOLS_DIR = "buildtools/" DEFAULT_SERVER_VER = "latest" DEFAULT_JVM_DEBUG_PORT = 25577 -if (os.getcwd().endswith("scripts/")): - os.chdir("../") if sys.version_info.major != 3: print("Script requires Python3 to run. You are currently running {0}.".format(sys.version)) exit(1) +if (os.getcwd().endswith("scripts/")): + os.chdir("../") + def project_gen() -> int: print("Generate Project:") print("Step 1) Generate Maven project.")