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