From d3894941051157d37b5e2e44bd19d41a4fc35bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20=22Dezzy=22=20Victor?= Date: Thu, 30 Jul 2026 19:50:28 -0300 Subject: [PATCH] exit 0 when accessibility is missing HotkeyMonitor.start() opens the Accessibility prompt and throws tapCreateFailed. run() turned that into ExitCode(1), and the LaunchAgent sets KeepAlive{SuccessfulExit: false}, so launchd relaunched the daemon, which prompted again -- nine dialogs in a row before the grant landed. A missing permission is not transient, so a relaunch cannot clear it. Exit 0 and let the user grant once, then start parrot again. --- Sources/parrot/Parrot.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/parrot/Parrot.swift b/Sources/parrot/Parrot.swift index 05a69eb..adf1dc9 100644 --- a/Sources/parrot/Parrot.swift +++ b/Sources/parrot/Parrot.swift @@ -157,7 +157,9 @@ struct Run: ParsableCommand { } catch { FileHandle.standardError.write(Data("failed to register hotkey tap: \(error)\n".utf8)) FileHandle.standardError.write(Data("run `parrot setup` to configure permissions.\n".utf8)) - throw ExitCode(1) + // Exit 0: a missing permission is not transient, and the LaunchAgent's + // KeepAlive would otherwise restart us into an endless prompt loop. + throw ExitCode(0) } let sigint = DispatchSource.makeSignalSource(signal: SIGINT, queue: .main)