kcrawford / dockutil

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

dockutil 3.0.0-beta.1 --allhomes as root fails #112

Closed kiepenflicker closed 2 years ago

kiepenflicker commented 2 years ago

Thanks for the new dockutil Beta! :-) I encountered a Bug when executed as root. When i execute it with the normal user it works for the current user. Version 2.0.5 docked it to all homes with this command, the 3.0.0 beta1 fails.

sudo /usr/local/bin/dockutil --add '/Applications/Microsoft Edge.app' --after 'Mission Control' --allhomes Error: /var/root/Library/Preferences/com.apple.dock.plist does not seem to be a home directory or a dock plist Usage: dockutil [<options>] [<plist-location-specification> ...] See 'dockutil --help' for more information. [file:///Users/.localized, file:///Users/Shared/, file:///Users/testuser1/, file:///Users/testuser2/] /Users/.localized/Library/Preferences /Users/Shared/Library/Preferences /Users/testuser1/Library/Preferences /Users/testuser2/Library/Preferences

kcrawford commented 2 years ago

Thanks for testing and reporting the issue! I will investigate.

mjsanders commented 2 years ago

We see similar issues as @kiepenflicker . (we run dockutil as postinstall script from WorkspaceONE, it runs as root, so the --allhomes feature is used to manage the current user's dock). If needed, ping me to give more troubleshooting info.

kcrawford commented 2 years ago

Thanks for your patience. Please retest in beta 2. It should be fixed.

mjsanders commented 2 years ago

Yes, fixed for me! Many thanks for this rewrite of dockutil!

kcrawford commented 2 years ago

I'll close this specific issue but if you see others please do report them. Thanks @kiepenflicker and @mjsanders