(url, dest)
| 140 | } |
| 141 | |
| 142 | function tryCurlDownload(url, dest) { |
| 143 | const curl = process.platform === 'win32' ? 'curl.exe' : 'curl' |
| 144 | const result = spawnSync(curl, ['-fsSL', '-L', '--fail', '-o', dest, url], { |
| 145 | stdio: 'pipe', |
| 146 | windowsHide: true, |
| 147 | }) |
| 148 | return result.status === 0 && existsSync(dest) && statSync(dest).size > 0 |
| 149 | } |
| 150 | |
| 151 | async function fetchRelease(url) { |
| 152 | if (proxyEnvSet()) { |
no test coverage detected