From ee00947557808a55da807eb9cd71e456dc02008d Mon Sep 17 00:00:00 2001 From: drojf <1249449+drojf@users.noreply.github.com> Date: Fri, 26 Jul 2024 23:54:52 +1000 Subject: [PATCH] Fix error if ui-compiler already exists and add message when removing old vanilla folder --- build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.py b/build.py index 89988f7..068401a 100644 --- a/build.py +++ b/build.py @@ -385,6 +385,7 @@ if lastModifiedManager.isRemoteModifiedAndUpdateMemory(assets_url) or force_down print("Downloading and Extracting Vanilla assets") pathlib.Path(vanilla_archive).unlink(missing_ok=True) if os.path.exists(vanilla_folder_path): + print("Attempting to remove old vanilla folder...") shutil.rmtree(vanilla_folder_path) download(assets_url) @@ -434,6 +435,8 @@ try: working_cargo = True except: print("No working Rust/cargo found - download binary release of UI compiler...") + if os.path.exists('ui-compiler.exe'): + os.remove('ui-compiler.exe') download( "https://github.com/07th-mod/ui-editing-scripts/releases/latest/download/ui-compiler.exe" )