Skip to content

Cover macOS manager updates beside apps with framework links - #44

Merged
CryptoKey98 merged 2 commits into
CryptoKey98:integration/manager-improvementsfrom
seltzdesign:fix/macos-update-sibling-links
Oct 18, 2026
Merged

CryptoKey98 merged 2 commits into
CryptoKey98:integration/manager-improvementsfrom
seltzdesign:fix/macos-update-sibling-links

Conversation

@seltzdesign

Copy link
Copy Markdown
Contributor

Problem

On macOS, updating 0.8.1 → 0.9.0 from /Applications fails and rolls back:

Manager update failed: Update failed; the previous manager was restored: Archive contains a linked path: /Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Electron Framework. Recovery files: /Applications/.craft-manager-update-…

The swap is performed by a copy of the previous manager. In 0.8.1–0.8.3, adopt_updated_portable calls files::no_links(base), which walks the whole application folder. Any other app with framework symlinks (Electron apps such as VS Code, plus many others) makes the launch step fail after the new bundle is published, so swap_macos restores the old one. Each attempt leaves a ~66 MB .craft-manager-update-* folder behind. It only happens when portable.txt is not beside the app, because the early local_storage return skips the scan otherwise.

0.9.0 (3ea87ef) already limits the check to the folder itself and its metadata files. This PR keeps that from regressing and helps users who are already stuck.

Changes

  • Regression test full_apply_ignores_links_inside_other_applications: runs apply_macos_with end to end with a sibling Other.app containing a framework symlink, and asserts that the update is published, previous.app is kept, the sibling link is untouched and the result is launch_requested. With the 0.8.1 no_links(base) call restored, this test fails with the reported error. Until now no full-apply test exercised a successful swap.
  • Error wording: files::no_links also guards installed bundles and staging folders, so "Archive contains a linked path" pointed at the wrong cause. It now says "Linked path is not allowed: …".
  • docs/macos.md: explains that 0.8.1–0.8.3 cannot update themselves beside such apps, and that those users must replace the app manually from the latest release once. It also notes that the leftover recovery folders can then be removed.

Testing

  • cargo test --lib self_update: 28 passed on macOS.
  • cargo test -- --test-threads=1: 202 passed, 1 failed. The failing test, updates::planning_tests::custom_destination_keeps_pinned_release_and_rejects_a_late_folder_collision, fails the same way on unmodified main, so this change didn't cause it. A parallel cargo test run also shows ~24 failures from shared state in portable/settings/updates tests, again on unmodified main.

🤖 Generated with Claude Code

CryptoKey98 and others added 2 commits October 16, 2026 05:08
…r-improvements

Prepare 0.9.0: custom app identity, updater reliability and discovery fixes
Managers 0.8.1 to 0.8.3 scanned the entire application folder for links
while adopting portable metadata, so updating /Applications/Craft Apps
Manager.app rolled back whenever another app (for example an Electron app
such as Visual Studio Code) contained framework symlinks. 0.9.0 scoped
that check to the folder and its metadata; this adds an end-to-end apply
test that reproduces the old failure, so the scope cannot regress.

The link check also guards installed bundles and staging folders, so its
error no longer claims the path is inside an archive. The macOS guide
explains how 0.8.x users can update manually, since the previous
manager's helper performs the swap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CryptoKey98
CryptoKey98 merged commit 810acb7 into CryptoKey98:integration/manager-improvements Oct 18, 2026
7 checks passed
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.

2 participants