artifact-provider: improve logging

This commit is contained in:
Michal Dorner 2021-02-15 20:46:28 +01:00
parent da9cc2c0d9
commit 1ae86a176d
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
4 changed files with 65 additions and 35 deletions

View file

@ -74,7 +74,7 @@ export async function downloadArtifact(
core.info(`Downloading ${url}`)
downloadStream.on('downloadProgress', ({transferred}) => {
const percentage = Math.round(transferred / size * 100)
const percentage = Math.round((transferred / size) * 100)
core.info(`Progress: ${transferred}/${size} (${percentage}%)`)
})
await asyncStream(downloadStream, fileWriterStream)