alexscheelmeyer / node-phantom

bridge to PhantomJS from Node.js
317 stars 117 forks source link

PhantomJS bin script cannot be spawned in Windows using phantomPath option #92

Open gamtiq opened 10 years ago

gamtiq commented 10 years ago

I tried to detect why a script does not work in my system (Windows 7) and found that the problem is related to node-phantom and phantomjs bin script. Namely, node-phantom cannot spawn PhantomJS when phantomPath option points to phantomjs bin script. This can be fixed (quick and dirty) by changing the line to the following:

var phantom=child.spawn("node", [options.phantomPath].concat(args));

Is it possible to make some changes (maybe via checks and/or additional option) so that bin script can be used in Windows to run PhantomJS?