{"action":"opened","issue":{"url":"https://api.github.com/repos/Unitech/PM2/issues/1450","labels_url":"https://api.github.com/repos/Unitech/PM2/issues/1450/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/PM2/issues/1450/comments","events_url":"https://api.github.com/repos/Unitech/PM2/issues/1450/events","html_url":"https://github.com/Unitech/PM2/issues/1450","id":96264010,"number":1450,"title":"pm2 startup on darwin doesn't make sure LaunchAgents directory exists","user":{"login":"hideov","id":891999,"avatar_url":"https://avatars.githubusercontent.com/u/891999?v=3","gravatar_id":"","url":"https://api.github.com/users/hideov","html_url":"https://github.com/hideov","followers_url":"https://api.github.com/users/hideov/followers","following_url":"https://api.github.com/users/hideov/following{/other_user}","gists_url":"https://api.github.com/users/hideov/gists{/gist_id}","starred_url":"https://api.github.com/users/hideov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hideov/subscriptions","organizations_url":"https://api.github.com/users/hideov/orgs","repos_url":"https://api.github.com/users/hideov/repos","events_url":"https://api.github.com/users/hideov/events{/privacy}","received_events_url":"https://api.github.com/users/hideov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-21T08:56:44Z","updated_at":"2015-07-21T08:56:44Z","closed_at":null,"body":"When calling `pm2 startup` from osx, pm2 tries to create `/Users/<user>/Library/LaunchAgents/io.keymetrics.PM2.plist`.\r\nIf LaunchAgents was not created before, pm2 emits an exception \r\n>Error: ENOENT: no such file or directory, open '/Users/administrator/Library/LaunchAgents/io.keymetrics.PM2.plist'\r\n>    at Error (native)\r\n>    at Object.fs.openSync (fs.js:549:18)\r\n>    at Object.fs.writeFileSync (fs.js:1155:15)\r\n>    at Object.CLI.startup (/usr/local/lib/node_modules/pm2/lib/CLI.js:594:8)\r\n>    at Command.<anonymous> (/usr/local/lib/node_modules/pm2/bin/pm2:476:9)\r\n>    at Command.listener (/usr/local/lib/node_modules/pm2/node_modules/commander/index.js:301:8)\r\n>    at emitTwo (events.js:87:13)\r\n>    at Command.emit (events.js:172:7)\r\n>    at Command.parseArgs (/usr/local/lib/node_modules/pm2/node_modules/commander/index.js:610:12)\r\n>    at Command.parse (/usr/local/lib/node_modules/pm2/node_modules/commander/index.js:458:21)\r\n\r\nThe solution is to `mkdir ~/Library/LaunchAgents`."}}