diff --git a/build.py b/build.py index f663415..d44d2e0 100644 --- a/build.py +++ b/build.py @@ -67,6 +67,15 @@ ] lib_source_files = [] +try: + print('Pulling submodules...', end='') + subprocess.run(['git', 'submodule', 'update', '--init', '--recursive']) + subprocess.run(['git', 'pull', '--recurse-submodules']) + +except Exception as e: + print(f"Failed to pull up submodules with error: {e}") + exit(1) + def get_ext_instructions(): print('Checking extended instruction availability...') features_to_check = [ @@ -161,10 +170,6 @@ def include_sha_headers(): lib_source_files.append(os.path.join(root, file)) try: - print('Pulling submodules...', end='') - subprocess.run(['git', 'submodule', 'update', '--init', '--recursive']) - subprocess.run(['git', 'pull', '--recurse-submodules']) - ext_instructions = get_ext_instructions() if PLATFORM == 'Linux': subprocess.run(['sudo', 'apt', 'update'])