Skip to content

Commit 26d35a3

Browse files
authored
fix: don't write progress report when output is not connected to tty (#91)
fixes #90
1 parent 57623c9 commit 26d35a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/download.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ async function downloadVSCodeArchive(version: DownloadVersion, platform: Downloa
8181
}
8282

8383
function printProgress(baseText: string, res: IncomingMessage) {
84+
if (!process.stdout.isTTY) {
85+
return;
86+
}
87+
8488
const total = Number(res.headers['content-length']);
8589
let received = 0;
8690
let timeout: NodeJS.Timeout | undefined;

0 commit comments

Comments
 (0)