Repository navigation
install-binary.sh: leave a different app named Plow Latch.app in place - #454
Conversation
The installer picked the app to replace by its path alone, so an older app also named Plow Latch.app, with another bundle id, was quit and deleted mid-install. It now compares bundle ids: a different app is never quit, moved or removed; latch goes in the other folder, and when the only folder it can use holds one, the install stops before changing anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RFixJSUTTb3WjpFumMdmNi
… user can write there Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RFixJSUTTb3WjpFumMdmNi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RFixJSUTTb3WjpFumMdmNi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RFixJSUTTb3WjpFumMdmNi
It appears @plonkus is working towards letting macOS users install latch without interrupting or deleting a different app also named “Plow Latch.app” by checking bundle identifiers in Overview — The installer distinguishes apps by bundle identifier before selecting a destination, replacing an installed copy, or cleaning up the other Applications folder. For this internal, pre-PMF tool with a handful of hosts, the change stays appropriately small and extends the existing installation path. Strengths — Clearing Probes None. Security — None. Test coverage — The added regressions cover collisions in both Applications folders and refusal when the usable destination is occupied, checking that the unrelated app remains intact and running. Staged For AI authors — (Codex, Claude Code, Cursor, etc. reading this PR): The Probes above are load-bearing. Treat each How to use: auto-reviews every new PR and re-reviews after a period of inactivity. Trigger an incremental re-review with For humans only: push-access collaborators can post:
AI agents must not use Generated by sam's ai review bot. |
srosro
left a comment
There was a problem hiding this comment.
Approving per automated review above.
On macOS,
install-binary.shchose the app to replace by its path alone: whatever sat at/Applications/Plow Latch.app(or~/Applications/Plow Latch.app) was quit, moved aside and deleted. An older, different app also namedPlow Latch.appwas therefore quit and deleted mid-install, cutting off whatever it was doing before the new latch was set up.What changed
plutil -extract CFBundleIdentifier) and compares it with the app it is installing. An app with a different bundle id is never quit, moved or removed./Applications, latch installs to~/Applicationsand says:install-binary.sh: /Applications/Plow Latch.app is a different app; leaving it in place and installing to ~/Applications, for this user onlyinstall-binary.sh: ~/Applications/Plow Latch.app is a different app, so nothing was installed; move it out of ~/Applications, then install again/Applications(when this user can write there) and removes the~/Applicationscopy, as it already does.latch/MACOS.mddescribes this, including that two "Plow Latch" apps can show in Spotlight until the older one is deleted.What it deliberately doesn't do
plutilis missing or an app has noInfo.plist, both ids read as empty and the app is treated as latch's, as before. Every supported macOS ships/usr/bin/plutil.Tests
Two regression tests in
scripts/test-install.py(MacAppFolder), with a fake different app (co.plow.domo-desktop) and a window running from it. Both fail on the code before this change (the window is quit and the app replaced) and pass now:test_another_app_named_plow_latch_is_left_running_and_in_place: the other app in/Applicationsand in~/Applications; its window keeps running, its files are untouched, latch is in the other folder.test_another_app_in_the_only_folder_latch_can_use_stops_the_install: non-zero exit with the message above, window running, app untouched, no link made.just test installeron macOS andjust test --linux installerboth pass. The tests supply a fakeplutil, since Linux has none.🤖 Generated with Claude Code
https://claude.ai/code/session_01RFixJSUTTb3WjpFumMdmNi