From cff75bf49683de2b63550095d92c7f9235976509 Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Wed, 22 Apr 2026 17:32:34 -0700 Subject: [PATCH] fix: clear plugin __pycache__ before applying patches to prevent stale bytecode --- install.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.py b/install.py index 471bf4f..8cfe748 100755 --- a/install.py +++ b/install.py @@ -109,6 +109,13 @@ def run_plugin_patch(plugin_dir: str, yes_all: bool = False) -> bool: return False +def clear_plugin_caches(): + for plugin_name in os.listdir(PLUGINS_DIR): + cache_dir = os.path.join(PLUGINS_DIR, plugin_name, "__pycache__") + if os.path.isdir(cache_dir): + rmtree(cache_dir) + + def apply_plugins(yes_all: bool = False): print("[2/3] Applying plugins...") @@ -307,6 +314,7 @@ def main(): sys.exit(0) print() clone_repo(force=not args.no_reclone) + clear_plugin_caches() apply_plugins(yes_all=args.yes) build_and_flash(args.environment) print("\nDone.")