(url, dest)
| 62 | } |
| 63 | |
| 64 | export function downloadFile(url, dest) { |
| 65 | try { |
| 66 | execSync(`curl -fL -sS -o "${dest}" "${url}"`, { |
| 67 | stdio: 'pipe', |
| 68 | }); |
| 69 | return dest; |
| 70 | } catch (e) { |
| 71 | console.error(`Failed to download file from ${url}`); |
| 72 | throw e; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | export function findFile(startPath, filter) { |
| 77 | if (!fs.existsSync(startPath)) { |