fix: set non-0 exit code for install scripts if there are problems (#1739)

Fixes #1731
This commit is contained in:
Andrey Lushnikov 2020-04-15 11:42:45 -07:00 committed by GitHub
parent 9efc66366c
commit 8c40b920c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,10 @@ async function downloadBrowserWithProgressBar(options) {
lastDownloadedBytes = downloadedBytes;
progressBar.tick(delta);
}
await browserFetcher.downloadBrowser({...options, progress});
await browserFetcher.downloadBrowser({...options, progress}).catch(e => {
process.exitCode = 1;
throw e;
});
logPolitely(`${options.progressBarBrowserName} downloaded to ${options.downloadPath}`);
}