File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -824,6 +824,19 @@ def remove_local_duckdb(app_home: Path = APP_HOME) -> None:
824824 warn (f"Could not remove { db_path } : { exc } " )
825825
826826
827+ def remove_cache_folders (app_home : Path = APP_HOME ) -> None :
828+ """Remove .crush and .local cache folders so each run starts fresh."""
829+ cache_dirs = [".crush" , ".local" ]
830+ for dir_name in cache_dirs :
831+ dir_path = app_home / dir_name
832+ try :
833+ if dir_path .exists ():
834+ shutil .rmtree (dir_path )
835+ info (f"Removed cache folder: { dir_path } " )
836+ except Exception as exc : # pragma: no cover - best effort cleanup
837+ warn (f"Could not remove { dir_path } : { exc } " )
838+
839+
827840def preflight_crush () -> None :
828841 """Validate that Crush can be launched."""
829842 section ("System preflight check" )
@@ -934,6 +947,7 @@ def main(argv: Sequence[str] | None = None) -> None:
934947 if not task_mode :
935948 banner_sequence ()
936949
950+ remove_cache_folders (app_home )
937951 ensure_app_home (app_home )
938952 if args .accept_license :
939953 _persist_license_acceptance (app_home = app_home )
You can’t perform that action at this time.
0 commit comments