{"action":"created","issue":{"url":"https://api.github.com/repos/kcrawford/dockutil/issues/58","repository_url":"https://api.github.com/repos/kcrawford/dockutil","labels_url":"https://api.github.com/repos/kcrawford/dockutil/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/kcrawford/dockutil/issues/58/comments","events_url":"https://api.github.com/repos/kcrawford/dockutil/issues/58/events","html_url":"https://github.com/kcrawford/dockutil/issues/58","id":163463140,"number":58,"title":"does not work when called from a launchagent","user":{"login":"jaltonen","id":10047665,"avatar_url":"https://avatars.githubusercontent.com/u/10047665?v=3","gravatar_id":"","url":"https://api.github.com/users/jaltonen","html_url":"https://github.com/jaltonen","followers_url":"https://api.github.com/users/jaltonen/followers","following_url":"https://api.github.com/users/jaltonen/following{/other_user}","gists_url":"https://api.github.com/users/jaltonen/gists{/gist_id}","starred_url":"https://api.github.com/users/jaltonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaltonen/subscriptions","organizations_url":"https://api.github.com/users/jaltonen/orgs","repos_url":"https://api.github.com/users/jaltonen/repos","events_url":"https://api.github.com/users/jaltonen/events{/privacy}","received_events_url":"https://api.github.com/users/jaltonen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-01T19:49:16Z","updated_at":"2016-07-01T19:53:03Z","closed_at":null,"body":"I feel like I used dockutil in agents in the 10.9 days.  Went to use from an agent with 2.0.2 and 10.11 and could not get it to work.  Upgraded to 2.0.3 still not working.  Tried umpteen variations of how to identify the currently logged in user in the script, never could get it to work.  During troubleshooting i figured out i could get the dockutil statement to work in a LaunchAgent if i assigned the statement to a variable\r\n\r\nthis does not work \r\n/usr/local/bin/dockutil --add /Users/$USER/Downloads --display folder --section others\r\n\r\nfor reasons i don't understand this does work\r\ndoit=`/usr/local/bin/dockutil --add /Users/$USER/Downloads --display folder --section others`"},"comment":{"url":"https://api.github.com/repos/kcrawford/dockutil/issues/comments/230034140","html_url":"https://github.com/kcrawford/dockutil/issues/58#issuecomment-230034140","issue_url":"https://api.github.com/repos/kcrawford/dockutil/issues/58","id":230034140,"user":{"login":"jaltonen","id":10047665,"avatar_url":"https://avatars.githubusercontent.com/u/10047665?v=3","gravatar_id":"","url":"https://api.github.com/users/jaltonen","html_url":"https://github.com/jaltonen","followers_url":"https://api.github.com/users/jaltonen/followers","following_url":"https://api.github.com/users/jaltonen/following{/other_user}","gists_url":"https://api.github.com/users/jaltonen/gists{/gist_id}","starred_url":"https://api.github.com/users/jaltonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaltonen/subscriptions","organizations_url":"https://api.github.com/users/jaltonen/orgs","repos_url":"https://api.github.com/users/jaltonen/repos","events_url":"https://api.github.com/users/jaltonen/events{/privacy}","received_events_url":"https://api.github.com/users/jaltonen/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T19:53:03Z","updated_at":"2016-07-01T19:53:03Z","body":"\r\ndoit=`/usr/local/bin/dockutil --add /Users/$USER/Downloads --display folder --section others`\r\n"}}
{"actor":{"display_login":"jaltonen"}}