kcrawford / dockutil

command line tool for managing dock items
http://patternbuffer.wordpress.com
Apache License 2.0
1.36k stars 131 forks source link

#133 Dockutil does not restart Dock macOS 11.6.5 Big Sur and 12.6.3 M… #145

Closed ferben closed 1 year ago

ferben commented 1 year ago

Root cause: SCDynamicStoreCopyConsoleUser() does not return proper value in some cases, so fallback to POSIX method getuid() is correct.

Additional fix: If UID will be invalid (regardless of getuid() POSIX method fix) command "killall Dock" will be launched.