mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 19:40:07 +00:00
fix(uninstall): run LaunchServices refresh async so Press Enter prompt appears immediately
This commit is contained in:
@@ -736,9 +736,13 @@ batch_uninstall_applications() {
|
|||||||
printf '\n'
|
printf '\n'
|
||||||
|
|
||||||
if [[ $success_count -gt 0 && ${#success_items[@]} -gt 0 ]]; then
|
if [[ $success_count -gt 0 && ${#success_items[@]} -gt 0 ]]; then
|
||||||
# Refresh LaunchServices synchronously so Spotlight removes the app immediately.
|
# Kick off LaunchServices rebuild in background immediately after summary.
|
||||||
refresh_launch_services_after_uninstall 2> /dev/null || true
|
# The caller shows a 3s "Press Enter" prompt, giving the rebuild time to finish
|
||||||
remove_apps_from_dock "${success_items[@]}" 2> /dev/null || true
|
# before the user returns to the app list — fixes stale Spotlight entries (#490).
|
||||||
|
(
|
||||||
|
refresh_launch_services_after_uninstall 2> /dev/null || true
|
||||||
|
remove_apps_from_dock "${success_items[@]}" 2> /dev/null || true
|
||||||
|
) > /dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# brew autoremove can be slow — run in background so the prompt returns quickly.
|
# brew autoremove can be slow — run in background so the prompt returns quickly.
|
||||||
|
|||||||
Reference in New Issue
Block a user