You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// SKIP THE CHECK TEMPORARILY to debug SIGTRAP issues
34
-
debug("⚠️ ACCESSIBILITY CHECK DISABLED FOR DEBUGGING")
35
-
return
36
-
37
-
// Original code below
38
-
/*
39
-
// Use the constant directly as a String to avoid concurrency issues
40
-
let checkOptPrompt = "AXTrustedCheckOptionPrompt" as CFString
41
-
let options = [checkOptPrompt: true] as CFDictionary
42
-
let accessEnabled = AXIsProcessTrustedWithOptions(options)
43
-
32
+
33
+
// Check without prompting. The prompt can cause issues for command-line tools.
34
+
letaccessEnabled=AXIsProcessTrusted()
35
+
44
36
if !accessEnabled {
45
-
print("Error: This application requires accessibility permissions.")
46
-
print("Please enable them in System Preferences > Privacy & Security > Accessibility")
37
+
// Output to stderr so it can be captured by the calling process
38
+
fputs("ERROR: Accessibility permissions are not granted for the application running this tool.\n", stderr)
39
+
fputs("Please ensure the application that executes 'ax' (e.g., Terminal, your IDE, or the Node.js process) has 'Accessibility' permissions enabled in:\n", stderr)
0 commit comments