git-gui: Visualize * History does nothing on macOS
- From
- Ilya Kulakov <kulakov.ilya@gmail.com>
- Date
- May 9, 2024, 18:17 UTC
- Message-ID
- <38A18180-3CC9-411B-B5D3-36C5C32B6EE9@gmail.com>
Both "Visualize <branch>'s History" and "Visualize All Branch History" do nothing on macOS. In the terminal it logs:
Error in startup script: 58:103: execution error: Not authorized to send Apple events to System Events. (-1743)
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 "/opt/homebrew/bin/gitk" line 12321)The relevant code at https://github.com/git/git/blob/0f3415f1f8478b05e64db11eb8aaa2915e48fef6/git-gui/git-gui.sh#L271-L279 should not be fatal, because the permission to access "System Events" and arbitrarily manipulate windows is optional.
Best Regards, Ilya Kulakov