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