git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitk: macOS: ignore osascript errors

From
Beat Bolli <dev+git@drbeat.li>
Date
Oct 25, 2020, 17:51 UTC
Message-ID
<20201025175149.11853-1-dev+git@drbeat.li>
Starting gitk on a macOS 10.14.6 (Mojave) system fails with the error
    Error in startup script: 2020-10-25 17:16:44.568 osascript[36810:18758270]
    Error loading /Library/QuickTime/EyeTV MPEG Support.component/Contents/MacOS/EyeTV MPEG Support:
    dlopen(/Library/QuickTime/EyeTV MPEG Support.component/Contents/MacOS/EyeTV MPEG Support, 0x0106):
    code signature in (/Library/QuickTime/EyeTV MPEG Support.component/Contents/MacOS/EyeTV MPEG Support)
    not valid for use in process: mapping process is a platform binary, but mapped file is not
    [[this same message repeated dozens of times]]
        while executing
    "exec osascript -e [format {
            tell application "System Events"
                set frontmost of processes whose unix id is %d to true
            end te..."
        invoked from within
    "if {[tk windowingsystem] eq "aqua"} {
        exec osascript -e [format {
            tell application "System Events"
                set frontmost of processes ..."
        (file "./gitk" line 12265)

Ignore errors from the osascript invocation, especially because this macOS version seems to correctly place the gitk window in the foreground.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
---
 gitk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitk b/gitk
index 23d9dd1..8551711 100755
--- a/gitk
+++ b/gitk
@@ -12290,11 +12290,11 @@ if {[catch {package require Tk 8.4} err]} {
 
 # on OSX bring the current Wish process window to front
 if {[tk windowingsystem] eq "aqua"} {
-    exec osascript -e [format {
+    catch { exec osascript -e [format {
         tell application "System Events"
             set frontmost of processes whose unix id is %d to true
         end tell
-    } [pid] ]
+    } [pid] ] }
 }
 
 # Unset GIT_TRACE var if set
-- 
2.28.0
Next: Stefan Haller
Message 1 of 3 in “gitk: macOS: ignore osascript errors”
  1. gitk: macOS: ignore osascript errorsBeat Bolli, Oct 25, 2020
  2. Stefan HallerOct 26, 2020
  3. Beat BolliOct 27, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.