Don't swallow unexpected errors when checking for phantomjs-prebuilt.

This commit is contained in:
Ben Newman
2016-08-03 15:21:16 -04:00
parent 2de0fb59ef
commit 1d5ca820df

View File

@@ -30,7 +30,7 @@ var upgraders = require('../upgraders.js');
require("../tool-env/install-runtime.js");
try {
var phantomjs = require('phantomjs-prebuilt');
var phantomPath = require.resolve('phantomjs-prebuilt');
} catch (e) {
throw new Error([
"Please install PhantomJS by running the following command:",
@@ -42,6 +42,8 @@ try {
].join("\n"));
}
var phantomjs = require(phantomPath);
// To allow long stack traces that cross async boundaries
require('longjohn');