diff --git a/Sources/ActiveWinCLI/main.swift b/Sources/ActiveWinCLI/main.swift index fa260f0..fd69efa 100644 --- a/Sources/ActiveWinCLI/main.swift +++ b/Sources/ActiveWinCLI/main.swift @@ -87,7 +87,7 @@ let disableScreenRecordingPermission = CommandLine.arguments.contains("--no-scre let enableOpenWindowsList = CommandLine.arguments.contains("--open-windows-list") // Show accessibility permission prompt if needed. Required to get the complete window title. -if !AXIsProcessTrustedWithOptions(["AXTrustedCheckOptionPrompt": true] as CFDictionary) { +if !disableScreenRecordingPermission && !AXIsProcessTrustedWithOptions(["AXTrustedCheckOptionPrompt": true] as CFDictionary) { print("active-win requires the accessibility permission in “System Settings › Privacy & Security › Accessibility”.") exit(1) }