Emit error if api is not stopped and exit code is greater than zero (#22224) (#22258)

This commit is contained in:
liza-mae 2018-08-22 12:15:54 -06:00 committed by GitHub
parent 041cef0ef2
commit 09135510e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ export function createLocalBrowserDriverApi(log, url, browser) {
});
proc.on('exit', (code) => {
if (!api.isStopped() || code > 0) {
if (!api.isStopped() && code > 0) {
api.emit('error', new Error(driverName + ` exited with code ${code}`));
}
});