Merge pull request #5944 from marco-c/better_error_message_if_browser_path_doesnt_exist

Fail with a more informative error message if the browser executable pat...
This commit is contained in:
Tim van der Meij 2015-04-17 20:21:50 +02:00
commit 62c3db0bf5

View File

@ -145,6 +145,10 @@ ChromiumBrowser.prototype.buildArguments = function (url) {
WebBrowser.create = function (desc) {
var name = desc.name;
// Throws an exception if the path doesn't exist.
fs.statSync(desc.path);
if (/firefox/i.test(name)) {
return new FirefoxBrowser(desc.name, desc.path);
}