fix(bar): stop install at the manual step when quarantine clearing fails

A failed quarantine clear previously fell through to the launch
handoff, so a default-yes prompt (or --launch) opened the still
quarantined app straight into the Gatekeeper block. Install now ends
after printing the manual xattr guidance, with a hint to run 'ccs bar'
once quarantine is cleared; --launch does not override a failed clear.
This commit is contained in:
Tam Nhu Tran committed 2026-06-10 13:42:52 -04:00
1 parent dfc8b7d1dc
commit 015cc4dd32
2 files changed
+142 -4

No files matched your search

+5 -1
View File
@@ -553,7 +553,9 @@ export async function handleBarInstall(
// 5. Quarantine handling: run `xattr -dr com.apple.quarantine` automatically.
// This clears the Gatekeeper quarantine flag that ad-hoc builds receive on download.
// On success: print [OK] confirmation. On failure: fall back to printed guidance.
// On success: print [OK] confirmation. On failure: fall back to printed guidance and
// SKIP the launch handoff entirely — launching a still-quarantined app hits the
// Gatekeeper block, so the user must clear quarantine manually first.
const quarantineCleared = await clearQuarantine(appPath);
if (quarantineCleared) {
console.log('[OK] Cleared Gatekeeper quarantine.');
@@ -562,6 +564,8 @@ export async function handleBarInstall(
console.log(' If macOS says the app is "damaged" or "unverified", run:');
console.log(` xattr -dr com.apple.quarantine "${appPath}"`);
console.log(' Or right-click the app and select Open.');
console.log('[i] After clearing quarantine, run `ccs bar` to launch.');
return;
}
// 6. Capability handshake via GET /api/bar/summary.