diff --git a/launcher.sh b/launcher.sh index 687bd8a..0c76b1e 100755 --- a/launcher.sh +++ b/launcher.sh @@ -689,6 +689,16 @@ init_directories() { } startup_detection() { + # Auto-clear cache if toolkit files are newer (fresh git pull) + # This ensures users always get fresh data after git updates + if [ -f "$BASE_DIR/.sysref.beta" ] && [ -f "$BASE_DIR/launcher.sh" ]; then + # If launcher.sh is newer than cache, it means git just pulled updates + # and we should rebuild cache with current code + if [ "$BASE_DIR/launcher.sh" -nt "$BASE_DIR/.sysref.beta" ]; then + rm -f "$BASE_DIR/.sysref.beta" "$BASE_DIR/.sysref.beta.timestamp" 2>/dev/null || true + fi + fi + # Initialize system detection first (required for show_system_overview) if [ -z "${SYS_DETECTION_COMPLETE:-}" ]; then initialize_system_detection