fix(install): prevent new-lines on CI/without TTY (#6703)

This commit is contained in:
Max Schmitt 2021-05-25 07:10:45 +02:00 committed by GitHub
parent f629cbe053
commit 39a8abd9ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,8 @@ export async function downloadBrowserWithProgressBar(registry: Registry, browser
let lastDownloadedBytes = 0;
function progress(downloadedBytes: number, totalBytes: number) {
if (!process.stderr.isTTY)
return;
if (!progressBar) {
progressBar = new ProgressBar(`Downloading ${progressBarName} - ${toMegabytes(totalBytes)} [:bar] :percent :etas `, {
complete: '=',