mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
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…
x
Reference in New Issue
Block a user