MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / resolveElectronExecutable

Function resolveElectronExecutable

tests/e2e/helpers/app-launcher.js:130–142  ·  view source on GitHub ↗
(deps = {})

Source from the content-addressed store, hash-verified

128}
129
130function resolveElectronExecutable(deps = {}) {
131 if (deps.electronPath) return deps.electronPath
132
133 const desktopPackageJson = path.resolve(__dirname, '../../../apps/desktop/package.json')
134 const requireElectron = deps.requireElectron || createRequire(desktopPackageJson)
135
136 try {
137 const electronModule = requireElectron('electron')
138 return typeof electronModule === 'string' ? electronModule : ''
139 } catch (error) {
140 throw new Error(`[AppLauncher] 无法解析 Electron 可执行文件: ${error.message}`)
141 }
142}
143
144/**
145 * 启动 Electron 应用

Callers 1

launchAppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected