From fbbe1d57a6142e6f2d71882539670963279ba3d9 Mon Sep 17 00:00:00 2001 From: Hamid Ghadyani Date: Thu, 12 Mar 2020 01:13:14 -0400 Subject: [PATCH] Trying to fix issues in Catalina - Some users report that osascript cannot run our browser detection code due to permissioin issues. This commit checks for macOS version and skips the call that we guess is the root of error (asking System Events to return name of all running processes) --- res/workflow/get-current-url.applescript | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/res/workflow/get-current-url.applescript b/res/workflow/get-current-url.applescript index 8f1e9be..f693210 100644 --- a/res/workflow/get-current-url.applescript +++ b/res/workflow/get-current-url.applescript @@ -1,5 +1,15 @@ on appIsRunning(appName) + set osver to system version of (system info) + considering numeric strings + set catalina to (osver >= "10.15" and osver < "10.16") + end considering + if catalina then + return true + end if tell application "System Events" to (name of processes) contains appName + -- set processName to run script "tell application \"System Events\" to (name of processes)" + -- set ret to processName contains appName + -- return ret end appIsRunning