MCPcopy Create free account
hub / github.com/google-gemini/gemini-cli / downloadFile

Function downloadFile

scripts/telemetry_utils.js:71–85  ·  view source on GitHub ↗
(url, dest)

Source from the content-addressed store, hash-verified

69}
70
71export function downloadFile(url, dest) {
72 try {
73 const result = spawnSync('curl', ['-fL', '-sS', '-o', dest, url], {
74 stdio: 'pipe',
75 encoding: 'utf-8',
76 });
77 if (result.status !== 0) {
78 throw new Error(result.stderr);
79 }
80 return dest;
81 } catch (e) {
82 console.error(`Failed to download file from ${url}`);
83 throw e;
84 }
85}
86
87export function findFile(startPath, filter) {
88 if (!fs.existsSync(startPath)) {

Callers 2

github.test.tsFile · 0.90
ensureBinaryFunction · 0.70

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected