MCPcopy Create free account
hub / github.com/claude-code-internals/claude-code-runnable / tryCurlDownload

Function tryCurlDownload

scripts/postinstall.cjs:74–78  ·  view source on GitHub ↗
(url, dest)

Source from the content-addressed store, hash-verified

72}
73
74function tryCurlDownload(url, dest) {
75 const curl = process.platform === 'win32' ? 'curl.exe' : 'curl'
76 const result = spawnSync(curl, ['-fsSL', '-L', '--fail', '-o', dest, url], { stdio: 'pipe', windowsHide: true })
77 return result.status === 0 && existsSync(dest) && statSync(dest).size > 0
78}
79
80async function fetchRelease(url) {
81 if (proxyEnvSet()) {

Callers 1

Calls 2

existsSyncFunction · 0.85
statSyncFunction · 0.85

Tested by

no test coverage detected