A local-first multi-agent app development platform, built on PenguinHarness
The macOS 'penguin' install quotes the app path it hands to the privileged shell
- Date: 2026-08-23
- Type: fix
- Scope:
desktop - PR: #411
Installing the penguin command on macOS falls back to osascript … with administrator privileges when linking /usr/local/bin/penguin is refused — the ordinary path on a Mac
without Homebrew, where that directory does not exist and creating it needs root. The
command it ran interpolated the app bundle's own path into a single-quoted shell word
without escaping it, so a bundle kept in a directory whose name contains an apostrophe
produced a command that broke out of its quoting and ran as root. Both quoting layers are
now applied by a generator in launcher.ts, next to the launcher scripts and covered by
the same unit tests.
Details
shellQuoterenders a value as one POSIX shell word, splicing embedded single quotes as'\'';appleScriptStringrenders the resulting command as an AppleScript literal, escaping the backslashes that splice introduces.adminSymlinkAppleScriptcomposes the two into thedo shell script …source thatcli-install.tspasses toosascript, so the escaping is chosen once and asserted directly rather than restated at the call site.- The link directory is derived from the link path instead of being spelled out twice.
- The AppImage wrapper's own refusal of quoted paths is unchanged: it bakes the path into a script that stays on disk, which is a different exposure from a one-shot command.