{"action":"created","issue":{"url":"https://api.github.com/repos/macbre/phantomas/issues/505","labels_url":"https://api.github.com/repos/macbre/phantomas/issues/505/labels{/name}","comments_url":"https://api.github.com/repos/macbre/phantomas/issues/505/comments","events_url":"https://api.github.com/repos/macbre/phantomas/issues/505/events","html_url":"https://github.com/macbre/phantomas/issues/505","id":62194038,"number":505,"title":"Fails when phantomjs pkg.path has a space","user":{"login":"ts-web","id":1311744,"avatar_url":"https://avatars.githubusercontent.com/u/1311744?v=3","gravatar_id":"","url":"https://api.github.com/users/ts-web","html_url":"https://github.com/ts-web","followers_url":"https://api.github.com/users/ts-web/followers","following_url":"https://api.github.com/users/ts-web/following{/other_user}","gists_url":"https://api.github.com/users/ts-web/gists{/gist_id}","starred_url":"https://api.github.com/users/ts-web/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ts-web/subscriptions","organizations_url":"https://api.github.com/users/ts-web/orgs","repos_url":"https://api.github.com/users/ts-web/repos","events_url":"https://api.github.com/users/ts-web/events{/privacy}","received_events_url":"https://api.github.com/users/ts-web/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/macbre/phantomas/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/macbre/phantomas/milestones/22","html_url":"https://github.com/macbre/phantomas/milestones/v1.11","labels_url":"https://api.github.com/repos/macbre/phantomas/milestones/22/labels","id":1000171,"number":22,"title":"v1.11","description":"","creator":{"login":"macbre","id":1929317,"avatar_url":"https://avatars.githubusercontent.com/u/1929317?v=3","gravatar_id":"","url":"https://api.github.com/users/macbre","html_url":"https://github.com/macbre","followers_url":"https://api.github.com/users/macbre/followers","following_url":"https://api.github.com/users/macbre/following{/other_user}","gists_url":"https://api.github.com/users/macbre/gists{/gist_id}","starred_url":"https://api.github.com/users/macbre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macbre/subscriptions","organizations_url":"https://api.github.com/users/macbre/orgs","repos_url":"https://api.github.com/users/macbre/repos","events_url":"https://api.github.com/users/macbre/events{/privacy}","received_events_url":"https://api.github.com/users/macbre/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":1,"state":"open","created_at":"2015-02-28T20:03:21Z","updated_at":"2015-03-19T20:24:54Z","due_on":"2015-04-29T22:00:00Z","closed_at":null},"comments":4,"created_at":"2015-03-16T20:02:32Z","updated_at":"2015-03-19T20:24:54Z","closed_at":"2015-03-19T20:24:54Z","body":"When I run the command on my Windows box, I get this error:\r\n\r\n    'C:\\Program' is not recognized as an internal or external command, operable program or batch file.\r\n\r\nI traced it down to **lib/engines.js**:109\r\n\r\n\t\tproc = spawn(engine.path, engineArgs, {\r\n\t\t\tenv: process.env\r\n\t\t});\r\n\r\n`engine.path` was set to `C:\\Program Files\\nodejs\\phantomjs.CMD` *(Note the space).* This was causing the error.\r\n\r\nengine.path comes from **lib/engines/webkit.js**\r\n\r\n    /**\r\n     * Defines PhantomJS engine\r\n     */\r\n    var pkg = require('phantomjs');\r\n    \r\n    module.exports = {\r\n    \tname: 'PhantomJS',\r\n    \tengine: 'webkit',\r\n    \tpath: pkg.path,\r\n    \tversion: pkg.version,\r\n    \tgetUserAgent: function() {\r\n    \t\treturn 'PhantomJS/' + pkg.version\r\n    \t}\r\n    };\r\n\r\nLine of interest: `path: pkg.path,`\r\n\r\nAnd I trace that back to **\\node_modules\\phantomjs\\lib\\location.js**\r\n\r\n    module.exports.location = \"C:\\\\Program Files\\\\nodejs\\\\phantomjs.CMD\"\r\n\r\nCan anyone shed some light on this problem?"},"comment":{"url":"https://api.github.com/repos/macbre/phantomas/issues/comments/83751435","html_url":"https://github.com/macbre/phantomas/issues/505#issuecomment-83751435","issue_url":"https://api.github.com/repos/macbre/phantomas/issues/505","id":83751435,"user":{"login":"macbre","id":1929317,"avatar_url":"https://avatars.githubusercontent.com/u/1929317?v=3","gravatar_id":"","url":"https://api.github.com/users/macbre","html_url":"https://github.com/macbre","followers_url":"https://api.github.com/users/macbre/followers","following_url":"https://api.github.com/users/macbre/following{/other_user}","gists_url":"https://api.github.com/users/macbre/gists{/gist_id}","starred_url":"https://api.github.com/users/macbre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macbre/subscriptions","organizations_url":"https://api.github.com/users/macbre/orgs","repos_url":"https://api.github.com/users/macbre/repos","events_url":"https://api.github.com/users/macbre/events{/privacy}","received_events_url":"https://api.github.com/users/macbre/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T20:24:54Z","updated_at":"2015-03-19T20:24:54Z","body":"Mystery solved :) Thanks!"}}