MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / printSpawnFailure

Function printSpawnFailure

freebuff/cli/release/index.js:581–608  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

579}
580
581function printSpawnFailure(err) {
582 resetTerminal()
583 const code = err && err.code ? ` (${err.code})` : ''
584
585 console.error(`Failed to start ${packageName}: ${err.message}${code}`)
586 console.error('')
587 console.error('System info:')
588 console.error(` Platform: ${process.platform} ${process.arch}`)
589 console.error(` Node: ${process.version}`)
590 console.error(` Binary: ${CONFIG.binaryPath}`)
591 console.error(` Exists: ${getInstalledBinaryStatus()}`)
592
593 if (process.platform === 'win32') {
594 console.error('')
595 console.error(
596 'On Windows, this can happen when Windows Security or antivirus blocks',
597 )
598 console.error(
599 'or quarantines the downloaded executable, or when the binary requires',
600 )
601 console.error('CPU instructions that are not available on this machine.')
602 }
603
604 console.error('')
605 console.error('Try deleting the downloaded files and running again:')
606 console.error(` ${CONFIG.configDir}`)
607 console.error('')
608}
609
610function spawnInstalledBinary(options = {}) {
611 if (!fs.existsSync(CONFIG.binaryPath)) {

Callers 1

spawnInstalledBinaryFunction · 0.70

Calls 2

resetTerminalFunction · 0.70
getInstalledBinaryStatusFunction · 0.70

Tested by

no test coverage detected