Skip to content

Commit 5b8d6b9

Browse files
Tom Schoenclaude
authored andcommitted
fix(launcher): stronger self-heal — clear all attrs + ad-hoc codesign
The '(null)' double-click error is the macOS symptom of a missing execute bit (and, on hardened Gatekeeper, an unsigned bundle). Make the first-run self-heal exhaustive: chmod -R +x the whole MacOS dir, xattr -cr to strip every download attribute (not just quarantine), and ad-hoc codesign the bundle (sign -, no certificate) so a normal double-click is accepted afterwards. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 27fca41 commit 5b8d6b9

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

VolScope.app/Contents/MacOS/VolScope

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ RES_DIR="$APP_DIR/Contents/Resources"
2525
# quarantine flag, which makes a fresh double-click fail with
2626
# '…does not have permission to open "(null)"'. Re-set both here, so AFTER
2727
# this first (Terminal-launched) run, double-clicking VolScope.app just works.
28-
chmod +x "$MACOS_DIR/VolScope" 2>/dev/null || true
28+
chmod -R +x "$APP_DIR/Contents/MacOS" 2>/dev/null || true
2929
[ -f "$REPO/Start VolScope.command" ] && chmod +x "$REPO/Start VolScope.command" 2>/dev/null || true
30-
xattr -dr com.apple.quarantine "$APP_DIR" 2>/dev/null || true
31-
xattr -dr com.apple.quarantine "$REPO/Start VolScope.command" 2>/dev/null || true
30+
xattr -cr "$APP_DIR" 2>/dev/null || true # clear ALL attrs (incl. quarantine)
31+
xattr -c "$REPO/Start VolScope.command" 2>/dev/null || true
32+
# Ad-hoc code-sign the bundle (no certificate needed) so Gatekeeper accepts
33+
# the unsigned app on a normal double-click after this first run.
34+
codesign --force --deep --sign - "$APP_DIR" 2>/dev/null || true
3235

3336
LOG_DIR="$HOME/Library/Logs/VolScope"
3437
mkdir -p "$LOG_DIR"

0 commit comments

Comments
 (0)