Repository navigation
fix: install packages when the configuration folder is a symbolic link - #531
Conversation
Foundation's resolvingSymlinksInPath() returns a path that doesn't exist yet unchanged, links in its existing folders included. With ~/.config/stablebar linked into a dotfiles checkout, a new package version, and the install record of a new ID, never shared the resolved packages folder's prefix, so every install failed with "Package path escapes its directory". The containment check now resolves the nearest existing ancestor and appends the missing components, which also refuses a new version under a link at packages/<id> that leads outside the packages folder. Fixes stablebox#530 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
M4n0x
left a comment
There was a problem hiding this comment.
Looks fine to me, the three tests fail without the fix and pass with it, approved the CI run too. Just a nitpick on the comment below
Before and after
60 unchanged screens
Visual review: 60 screens, none changed. |
The story of the bug belongs to the pull request; the comment now says only what the helper does for whoever reads it next. Co-Authored-By: Claude Opus 5.5 <[email protected]>
## [0.13.0](v0.12.0...v0.13.0) (2026-11-11) ### Features * answer common questions and send feedback from a Help section ([#564](#564)) ([325083e](325083e)) * apply migrations to includes, packages and every screen setup's bar ([#539](#539)) ([6cc59f4](6cc59f4)) * check in setup that Workspaces can reach yabai or OmniWM ([#552](#552)) ([3a9ef7e](3a9ef7e)), closes [#463](#463) * check the Switch to Desktop shortcuts in setup and Settings ([#551](#551)) ([92c11e1](92c11e1)), closes [#447](#447) * follow Reduce Transparency and Increase Contrast ([#542](#542)) ([3ea111b](3ea111b)) * guide Accessibility access with a panel to drag StableBar into System Settings ([#559](#559)) ([29f000c](29f000c)) * pause scripts and providers while the displays sleep or the screen is locked ([#538](#538)) ([a09513d](a09513d)) * sign updates with an EdDSA key as well as the Developer ID ([#540](#540)) ([7e34d56](7e34d56)) * turn on Keep windows clear in setup when no window manager runs ([#553](#553)) ([a80b001](a80b001)), closes [#466](#466) [#439](#439) ### Bug Fixes * follow Reduce Motion in setup's steps, theme row and tiles ([9c3f0c4](9c3f0c4)), closes [#465](#465) * install packages when the configuration folder is a symbolic link ([#531](#531)) ([7e4f88b](7e4f88b)), closes [#530](#530) * keep setup's later choices when the preset changes ([3318ae0](3318ae0)), closes [#461](#461) * keep the website's Store review sheet inside its window ([9519645](9519645)), closes [#526](#526) * leave windows alone until setup finishes ([#547](#547)) ([c9b75cf](c9b75cf)), closes [#466](#466) * let a group wider than its tray scroll sideways while editing the bar in place ([#543](#543)) ([f6e6e25](f6e6e25)) * make setup's tiles, closing card and permission buttons work with the keyboard and VoiceOver ([#554](#554)) ([0944100](0944100)), closes [#464](#464) * offer Keep notifications clear only on macOS 26 and later ([#550](#550)) ([5fd428a](5fd428a)), closes [#458](#458) * offer the Notch preset only on Macs with a notch ([#548](#548)) ([3fef60f](3fef60f)), closes [#457](#457) * open an app's own menu when Menu bar items can't draw its rows ([#541](#541)) ([24f16d7](24f16d7)) * shorten long errors in the bar's menus and open Status from them ([#536](#536)) ([5710a3e](5710a3e))
|
🎉 This PR is included in version 0.13.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Problem
With
~/.config/stablebarreached through a symbolic link, as in a dotfiles setup, every package install fails with "Package path escapes its directory: …/packages//." Fixes #530.Changes
validatePackagePathresolves both paths with a newresolvingSymlinks(_:). Foundation'sresolvingSymlinksInPath()returns a path that doesn't exist yet unchanged, links in its existing parent folders included, so the new version folder and a new ID's install record (packages/<id>/.source.json) never shared the resolved packages folder's prefix. The helper resolves the nearest existing ancestor and appends the missing components. A link counts as existing even when its target doesn't, so existing paths resolve exactly as before.packages/<id>that leads outsidepackagespass the check; it's now refused.PackagePathTestscovers installing into a linked configuration folder, missing paths inside and outside a linked folder, and the link atpackages/<id>.Testing
swift build --build-tests, thenswift test --skip-build: 742 tests passed.scripts/check.sh --quickandcommitlint --from origin/mainpass.WidgetPackageStore.install, the path a Store download takes after unpacking.Merging
One commit; any merge method works.
🤖 Generated with Claude Code — Claude Opus 5.5 via Claude Code