MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / ensureElectronBinary

Function ensureElectronBinary

scripts/electron-binary.ts:58–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56}
57
58export async function ensureElectronBinary() {
59 const binaryPath = tryResolveElectronBinary()
60 if (binaryPath) {
61 return binaryPath
62 }
63
64 console.log('Electron binary missing; installing Electron runtime...')
65 await runCommand('node', [getElectronInstallScriptPath()])
66
67 const resolvedBinaryPath = tryResolveElectronBinary()
68 if (!resolvedBinaryPath) {
69 throw new Error('Electron binary is still unavailable after installation.')
70 }
71
72 return resolvedBinaryPath
73}

Callers 1

startElectronProcessFunction · 0.90

Calls 3

tryResolveElectronBinaryFunction · 0.85
runCommandFunction · 0.85

Tested by

no test coverage detected