{"action":"created","issue":{"url":"https://api.github.com/repos/Unitech/PM2/issues/942","labels_url":"https://api.github.com/repos/Unitech/PM2/issues/942/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/PM2/issues/942/comments","events_url":"https://api.github.com/repos/Unitech/PM2/issues/942/events","html_url":"https://github.com/Unitech/PM2/issues/942","id":54510351,"number":942,"title":"Argument parsing","user":{"login":"joshperry","id":298053,"avatar_url":"https://avatars.githubusercontent.com/u/298053?v=3","gravatar_id":"","url":"https://api.github.com/users/joshperry","html_url":"https://github.com/joshperry","followers_url":"https://api.github.com/users/joshperry/followers","following_url":"https://api.github.com/users/joshperry/following{/other_user}","gists_url":"https://api.github.com/users/joshperry/gists{/gist_id}","starred_url":"https://api.github.com/users/joshperry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshperry/subscriptions","organizations_url":"https://api.github.com/users/joshperry/orgs","repos_url":"https://api.github.com/users/joshperry/repos","events_url":"https://api.github.com/users/joshperry/events{/privacy}","received_events_url":"https://api.github.com/users/joshperry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-15T21:58:48Z","updated_at":"2015-01-15T22:47:51Z","closed_at":null,"body":"Seems like every time I update PM2 something explodes. This time it's argument parsing, I got to the point where I just had to start adding logging entries in the code to see what was going on.\r\n\r\nHere is my process.json file:\r\n```\r\n{\r\n\t\"apps\" : [\r\n\t\t{\r\n\t\t\t\"name\": \"hubot-tron\",\r\n\t\t\t\"script\": \"./node_modules/.bin/hubot\",\r\n\t\t\t\"args\": \"['--adapter', 'hipchat', '--name', 'tron']\",\r\n\t\t\t\"watch\": \"true\",\r\n\t\t\t\"exec_mode\": \"fork_mode\",\r\n\t\t\t\"run_as_user\": \"app\",\r\n\t\t\t\"exec_interpreter\": \"coffee\",\r\n\t\t\t\"watch\": false,\r\n\t\t\t\"env\": {\r\n\t\t\t\t\"PORT\":\"8080\",\r\n\t\t\t\t\"HUBOT_HIPCHAT_JID\":\"148274_1070946@chat.hipchat.com\",\r\n\t\t\t\t\"HUBOT_HIPCHAT_PASSWORD\":\"Oh shit, passwords are bad...\"\r\n\t\t\t\t\"HUBOT_HIPCHAT_ROOMS\":\"148274_dev@conf.hipchat.com\",\r\n\t\t\t\t\"HUBOT_LOG_LEVEL\":\"debug\",\r\n\t\t\t\t\"HUBOT_AUTH_ADMIN\":\"Joshua Perry\"\r\n\t\t\t}\r\n\t\t}\r\n\t]\r\n}\r\n```\r\n\r\nAnd here is what PM2 sends to `spawn`:\r\n`spawn('coffee /opt/pdk/pdktron/node_modules/.bin/hubot,[,--adapter,,,hipchat,,,--name,,,tron,]', { args: [ '[', '--adapter', ',', 'hipchat', ',', '--name', ',', 'tron', ']' ], { ...snip... });`"},"comment":{"url":"https://api.github.com/repos/Unitech/PM2/issues/comments/70177489","html_url":"https://github.com/Unitech/PM2/issues/942#issuecomment-70177489","issue_url":"https://api.github.com/repos/Unitech/PM2/issues/942","id":70177489,"user":{"login":"Tjatse","id":1418444,"avatar_url":"https://avatars.githubusercontent.com/u/1418444?v=3","gravatar_id":"","url":"https://api.github.com/users/Tjatse","html_url":"https://github.com/Tjatse","followers_url":"https://api.github.com/users/Tjatse/followers","following_url":"https://api.github.com/users/Tjatse/following{/other_user}","gists_url":"https://api.github.com/users/Tjatse/gists{/gist_id}","starred_url":"https://api.github.com/users/Tjatse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tjatse/subscriptions","organizations_url":"https://api.github.com/users/Tjatse/orgs","repos_url":"https://api.github.com/users/Tjatse/repos","events_url":"https://api.github.com/users/Tjatse/events{/privacy}","received_events_url":"https://api.github.com/users/Tjatse/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T22:47:51Z","updated_at":"2015-01-15T22:47:51Z","body":"@joshperry The Config part was reconstructed since v0.12.2. try:\r\n```\r\n\"args\": [\"--adapter\", \"hipchat\", \"--name\", \"tron\"]\r\n```\r\n\r\nor\r\n```\r\n\"args\": \"--adapter hipchat --name tron\"\r\n```\r\n\r\nSorry for the confusion.\r\n\r\n"}}