MCPcopy Create free account
hub / github.com/different-ai/opencode-browser / resolveNodePath

Function resolveNodePath

bin/cli.js:179–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177}
178
179function resolveNodePath() {
180 if (process.env.OPENCODE_BROWSER_NODE) return process.env.OPENCODE_BROWSER_NODE;
181 if (process.execPath && /node(\.exe)?$/.test(process.execPath)) return process.execPath;
182 try {
183 const output = execSync("which node", { stdio: ["ignore", "pipe", "ignore"] })
184 .toString("utf8")
185 .trim();
186 if (output) return output;
187 } catch {}
188 return process.execPath;
189}
190
191function writeHostWrapper(nodePath) {
192 ensureDir(BASE_DIR);

Callers 2

installFunction · 0.85
updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected