Skip to content

fix(uninstall): keep Raycast v2 data when uninstalling Raycast v1#1202

Open
adilrc wants to merge 1 commit into
tw93:mainfrom
adilrc:adilrc/raycast-x-uninstall-guard
Open

fix(uninstall): keep Raycast v2 data when uninstalling Raycast v1#1202
adilrc wants to merge 1 commit into
tw93:mainfrom
adilrc:adilrc/raycast-x-uninstall-guard

Conversation

@adilrc

@adilrc adilrc commented Jul 7, 2026

Copy link
Copy Markdown

When uninstalling Raycast v1 (com.raycast.macos), Mole is also deleting Raycast v2 data (com.raycast-x.macos).
This is a consequence of #404, which implemented sweeping everything matching *raycast*.

Summary

The fix skips any basename matching raycast-x in each of the Raycast collection loops.

Safety Review

  • Does this change affect cleanup, uninstall, optimize, installer, remove, analyze delete, update, or install behavior?
    Yes, uninstall
  • Does this change affect path validation, protected directories, symlink handling, sudo boundaries, or release/install integrity?
    No
  • If yes, describe the new boundary or risk change clearly.
    Raycast v1 uninstall no longer touches com.raycast-x.macos.* directories which match Raycast v2 bundle ID.

Tests

  • bash -n lib/core/app_protection.sh and ./scripts/check.sh --format pass
  • Verified against real directories in ~/Library/Application Support, ~/Library/Caches, ~/Library/Containers: the Raycast V2 entries are excluded while V1 entries remain

Safety-related changes

Narrows Raycast v1 uninstall to stop deleting the separate com.raycast-x.macos.*

find_app_files() and find_app_system_files() collect any *raycast*
directory when uninstalling com.raycast.macos. The substring match also
caught com.raycast-x.macos.* (a separate product line), including its
.backups recovery siblings, removing data that is not a v1 leftover.

Skip basenames matching *raycast-x* (case-insensitive) in each of the
three Raycast collection loops. The trigger and the *raycast* sweep are
unchanged.
@adilrc adilrc requested a review from tw93 as a code owner July 7, 2026 08:27
@adilrc adilrc changed the title fix(uninstall): keep Raycast v2 data when uninstalling Raycast v2 fix(uninstall): keep Raycast v2 data when uninstalling Raycast v1 Jul 7, 2026
@adilrc adilrc mentioned this pull request Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant