fix: ensure length is treated as a number when starting progress bar

This commit is contained in:
Mr. M 2025-05-12 20:06:30 +02:00
parent e6da4e31f8
commit 1bc5e4772e
No known key found for this signature in database
GPG key ID: 6292C4C8F8652B18

View file

@ -38,7 +38,7 @@ export async function downloadFileToLocation(
}) })
: process.stdout, : process.stdout,
}) })
progressBar.start(length, receivedBytes) progressBar.start(length as number, receivedBytes)
data.on('data', (chunk: { length: number }) => { data.on('data', (chunk: { length: number }) => {
receivedBytes += chunk.length receivedBytes += chunk.length