Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not override Phantom JS executable #67

Open
jeffski opened this issue May 12, 2015 · 0 comments
Open

Can not override Phantom JS executable #67

jeffski opened this issue May 12, 2015 · 0 comments

Comments

@jeffski
Copy link

jeffski commented May 12, 2015

The README says you can override the Casper/Phantom binaries like this:

process.env.PHANTOMJS_EXECUTABLE = '/path/to/phantomjs';
process.env.CASPERJS_EXECUTABLE = '/path/to/casperjs';

This works for Casper JS and it is obvious from the code that this will work.

It doesn't seem to work for Phantom JS though and the code looks like it will only fall back on the binary if the node module is not found.

I quickly hacked tasks/lib/casper.js like below, which worked, but probably a better way:

//npm install wrapper
if (process.env["PHANTOMJS_EXECUTABLE"] && fs.existsSync(process.env["PHANTOMJS_EXECUTABLE"])) {
    var phantomjs = process.env["PHANTOMJS_EXECUTABLE"];
} else {
    var phantomjs = require('phantomjs');
}

It would be great if this could be fixed so that you can specify the binary as an override and not a fallback. As a bonus it would be good if SlimerJS could be overwritten too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant