fix(install): prevent new-lines on CI/without TTY (#6703)
This commit is contained in:
parent
f629cbe053
commit
39a8abd9ab
|
|
@ -54,6 +54,8 @@ export async function downloadBrowserWithProgressBar(registry: Registry, browser
|
||||||
let lastDownloadedBytes = 0;
|
let lastDownloadedBytes = 0;
|
||||||
|
|
||||||
function progress(downloadedBytes: number, totalBytes: number) {
|
function progress(downloadedBytes: number, totalBytes: number) {
|
||||||
|
if (!process.stderr.isTTY)
|
||||||
|
return;
|
||||||
if (!progressBar) {
|
if (!progressBar) {
|
||||||
progressBar = new ProgressBar(`Downloading ${progressBarName} - ${toMegabytes(totalBytes)} [:bar] :percent :etas `, {
|
progressBar = new ProgressBar(`Downloading ${progressBarName} - ${toMegabytes(totalBytes)} [:bar] :percent :etas `, {
|
||||||
complete: '=',
|
complete: '=',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue