OSX(macOS)でgitkを起動しようとすると以下のメッセージが出て起動できない。
Error in startup script:
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 "/usr/local/bin/gitk" line 12212
当該execをcatchで囲うとよいらしい。
index a14d7a16b2..f13d1807bb 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -12210,11 +12210,13 @@ 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 {
- tell application "System Events"
- set frontmost of processes whose unix id is %d to true
- end tell
- } [pid] ]
+ catch {
+ exec osascript -e [format {
+ tell application "System Events"
+ set frontmost of processes whose unix id is %d to true
+ end tell
+ } [pid] ]
+ }
}
# Unset GIT_TRACE var if set
以下をコピペで適用できます。
# on OSX bring the current Wish process window to front
if {[tk windowingsystem] eq "aqua"} {
catch {
exec osascript -e [format {
tell application "System Events"
set frontmost of processes whose unix id is %d to true
end tell
} [pid] ]
}
}
cf: https://public-inbox.org/git/20180724065120.7664-1-sunshine@sunshineco.com/