{"action":"created","issue":{"url":"https://api.github.com/repos/paulcbetts/xvfb-maybe/issues/5","repository_url":"https://api.github.com/repos/paulcbetts/xvfb-maybe","labels_url":"https://api.github.com/repos/paulcbetts/xvfb-maybe/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/paulcbetts/xvfb-maybe/issues/5/comments","events_url":"https://api.github.com/repos/paulcbetts/xvfb-maybe/issues/5/events","html_url":"https://github.com/paulcbetts/xvfb-maybe/pull/5","id":222561526,"number":5,"title":"Added support for xvfb-run arguments","user":{"login":"uuf6429","id":230049,"avatar_url":"https://avatars3.githubusercontent.com/u/230049?v=3","gravatar_id":"","url":"https://api.github.com/users/uuf6429","html_url":"https://github.com/uuf6429","followers_url":"https://api.github.com/users/uuf6429/followers","following_url":"https://api.github.com/users/uuf6429/following{/other_user}","gists_url":"https://api.github.com/users/uuf6429/gists{/gist_id}","starred_url":"https://api.github.com/users/uuf6429/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uuf6429/subscriptions","organizations_url":"https://api.github.com/users/uuf6429/orgs","repos_url":"https://api.github.com/users/uuf6429/repos","events_url":"https://api.github.com/users/uuf6429/events{/privacy}","received_events_url":"https://api.github.com/users/uuf6429/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-04-18T22:15:46Z","updated_at":"2017-04-27T15:45:47Z","closed_at":"2017-04-26T18:07:17Z","pull_request":{"url":"https://api.github.com/repos/paulcbetts/xvfb-maybe/pulls/5","html_url":"https://github.com/paulcbetts/xvfb-maybe/pull/5","diff_url":"https://github.com/paulcbetts/xvfb-maybe/pull/5.diff","patch_url":"https://github.com/paulcbetts/xvfb-maybe/pull/5.patch"},"body":"## Tests\r\n```javascript\r\nlet args = ['myapp', '-vvv', '--env=test'];\r\nconst dblDashPos = args.indexOf('--'),                             // -1\r\n  xvfbArgs = dblDashPos === -1 ? [] : args.splice(0, dblDashPos),  // []\r\n  exeCmd = dblDashPos === -1 ? args[dblDashPos === -1 ? 0 : 1],    // 'myapp'\r\n  exeArgs = args.splice(dblDashPos === -1 ? 1 : 2);                // ['-vvv', '--env=test']\r\n```\r\n```javascript\r\nlet args = ['-a', '--', 'myapp', '-vvv', '--env=test'];\r\nconst dblDashPos = args.indexOf('--'),                             // 1\r\n  xvfbArgs = dblDashPos === -1 ? [] : args.splice(0, dblDashPos),  // ['-a']\r\n  exeCmd = dblDashPos === -1 ? args[dblDashPos === -1 ? 0 : 1],    // 'myapp'\r\n  exeArgs = args.splice(dblDashPos === -1 ? 1 : 2);                // ['-vvv', '--env=test']\r\n```\r\n\r\n## Notes\r\n- When not run through `xvfb-run`, the `xvfbArgs` variable is rightfully unused.\r\n- This PR also fixes #3.\r\n- This PR will change the behaviour of how double dashes were previously handled (or the fact that they were ignored):\r\n    ```shell\r\n    # Before:\r\n    xvfb-maybe prog arg1 -- arg2       => prog arg1 -- arg2\r\n    # Now:\r\n    xvfb-maybe prog arg1 -- arg2       => arg1 arg2\r\n    # Fix:\r\n    xvfb-maybe -- prog arg1 -- arg2    => prog arg1 -- arg2\r\n    ```"},"comment":{"url":"https://api.github.com/repos/paulcbetts/xvfb-maybe/issues/comments/297754263","html_url":"https://github.com/paulcbetts/xvfb-maybe/pull/5#issuecomment-297754263","issue_url":"https://api.github.com/repos/paulcbetts/xvfb-maybe/issues/5","id":297754263,"user":{"login":"justinjmoses","id":799038,"avatar_url":"https://avatars2.githubusercontent.com/u/799038?v=3","gravatar_id":"","url":"https://api.github.com/users/justinjmoses","html_url":"https://github.com/justinjmoses","followers_url":"https://api.github.com/users/justinjmoses/followers","following_url":"https://api.github.com/users/justinjmoses/following{/other_user}","gists_url":"https://api.github.com/users/justinjmoses/gists{/gist_id}","starred_url":"https://api.github.com/users/justinjmoses/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinjmoses/subscriptions","organizations_url":"https://api.github.com/users/justinjmoses/orgs","repos_url":"https://api.github.com/users/justinjmoses/repos","events_url":"https://api.github.com/users/justinjmoses/events{/privacy}","received_events_url":"https://api.github.com/users/justinjmoses/received_events","type":"User","site_admin":false},"created_at":"2017-04-27T15:45:47Z","updated_at":"2017-04-27T15:45:47Z","body":"Seems as though this is the best workaround https://github.com/npm/npm/issues/12371#issuecomment-293211866"}}
{"actor":{"display_login":"justinjmoses"}}