Skip to content

Commit 969c875

Browse files
committed
findExecutable now makes exception for phantom
1 parent b8a15fc commit 969c875

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/util/findExecutable.js

+8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
var path = require('path');
22

33
module.exports = function(module, bin) {
4+
5+
if (module === 'phantomjs-prebuilt') {
6+
return require('phantomjs-prebuilt').path;
7+
}
8+
9+
// get the absolute path for package.json of a node_module
410
var packageJSON = require.resolve(path.join(module, 'package.json'));
511

12+
// then get the executable name
613
var relativeBinary = require(packageJSON).bin[bin];
714

15+
// return a path to the executable inside the execuatable's package
816
return path.join(packageJSON.replace('package.json', ''), relativeBinary);
917
};

0 commit comments

Comments
 (0)