(percentage, width = 30)
| 302 | } |
| 303 | |
| 304 | function createProgressBar(percentage, width = 30) { |
| 305 | const filled = Math.round((width * percentage) / 100) |
| 306 | const empty = width - filled |
| 307 | return '[' + '█'.repeat(filled) + '░'.repeat(empty) + ']' |
| 308 | } |
| 309 | |
| 310 | async function downloadBinary(version) { |
| 311 | const platformKey = `${process.platform}-${process.arch}` |