{"action":"created","issue":{"url":"https://api.github.com/repos/amir20/phantomjs-node/issues/368","repository_url":"https://api.github.com/repos/amir20/phantomjs-node","labels_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/368/comments","events_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/368/events","html_url":"https://github.com/amir20/phantomjs-node/issues/368","id":134950016,"number":368,"title":"No longer able to use phantom 2","user":{"login":"jrust","id":239838,"avatar_url":"https://avatars.githubusercontent.com/u/239838?v=3","gravatar_id":"","url":"https://api.github.com/users/jrust","html_url":"https://github.com/jrust","followers_url":"https://api.github.com/users/jrust/followers","following_url":"https://api.github.com/users/jrust/following{/other_user}","gists_url":"https://api.github.com/users/jrust/gists{/gist_id}","starred_url":"https://api.github.com/users/jrust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrust/subscriptions","organizations_url":"https://api.github.com/users/jrust/orgs","repos_url":"https://api.github.com/users/jrust/repos","events_url":"https://api.github.com/users/jrust/events{/privacy}","received_events_url":"https://api.github.com/users/jrust/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-19T19:17:11Z","updated_at":"2016-02-19T22:01:36Z","closed_at":null,"body":"### Expected behavior\r\n\r\nTo be able to specify the path to phantomjs with the `binary: /path/to/phantomj2` option.\r\n\r\n### Actual behavior\r\n\r\nSince issue #355 that is no longer possible because it always uses the version of phantomjs installed by this package and ignores any custom `binary` property.\r\n\r\n### Steps to reproduce the behavior\r\n\r\n1. [This script](https://gist.github.com/dmmmdfll/dcaa99040717e8b5a405), from #349, demonstrates using the binary option and it no longer has any effect."},"comment":{"url":"https://api.github.com/repos/amir20/phantomjs-node/issues/comments/186428142","html_url":"https://github.com/amir20/phantomjs-node/issues/368#issuecomment-186428142","issue_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/368","id":186428142,"user":{"login":"jrust","id":239838,"avatar_url":"https://avatars.githubusercontent.com/u/239838?v=3","gravatar_id":"","url":"https://api.github.com/users/jrust","html_url":"https://github.com/jrust","followers_url":"https://api.github.com/users/jrust/followers","following_url":"https://api.github.com/users/jrust/following{/other_user}","gists_url":"https://api.github.com/users/jrust/gists{/gist_id}","starred_url":"https://api.github.com/users/jrust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrust/subscriptions","organizations_url":"https://api.github.com/users/jrust/orgs","repos_url":"https://api.github.com/users/jrust/repos","events_url":"https://api.github.com/users/jrust/events{/privacy}","received_events_url":"https://api.github.com/users/jrust/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T22:01:36Z","updated_at":"2016-02-19T22:01:36Z","body":"I should have clarified that I am using phantomjs-node v 1.0.0.  I didn't think it safe to upgrade to the latest since it is in alpha.  So, in my project I have Right now in my project I have phantomjs-prebuilt installing version 2.1.4 of phantom, but this code seems to make it so that the version from phantomjs-node is used:\r\n```javascript\r\n    if require('phantomjs').path?\r\n       options.binary = require('phantomjs').path\r\n     else \r\n       options.path ?= ''\r\n       options.binary ?= options.path+'phantomjs'\r\n```"}}