Skip to content

Fix install-mac.sh corrupting files on macOS#115

Open
nakomis wants to merge 1 commit intoflorentbr:masterfrom
nakomis:fix/macos-echo-e-install-script
Open

Fix install-mac.sh corrupting files on macOS#115
nakomis wants to merge 1 commit intoflorentbr:masterfrom
nakomis:fix/macos-echo-e-install-script

Conversation

@nakomis
Copy link
Copy Markdown

@nakomis nakomis commented Apr 3, 2026

Problem

On macOS, echo does not support the -e flag — it outputs it literally rather than interpreting it as a flag. The write() helper uses echo -e "$(</dev/stdin)", which causes every file it writes to be prefixed with -e .

This corrupts two critical files in the app bundle:

  • Contents/Info.plist — becomes invalid XML, so macOS cannot parse CFBundleExecutable and reports "The application cannot be opened because its executable is missing."
  • Contents/MacOS/launch — its shebang becomes -e #!/bin/bash, making it non-executable

Fix

Replace echo -e "$(</dev/stdin)" with cat, which reads stdin directly and is fully portable across macOS and Linux.

Testing

Verified on macOS (Apple Silicon) — after this fix, install-mac.sh correctly writes both Info.plist and the launch script, and the app opens successfully.

On macOS, echo does not support the -e flag and outputs it literally,
corrupting every file written by the write() helper. This breaks the
app bundle: Info.plist becomes invalid XML (so macOS cannot find the
executable), and the launch script loses its shebang.

Replace echo -e "$(</dev/stdin)" with cat, which reads stdin directly
and is portable across all POSIX systems.
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