MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / getGlobalInstallRoot

Function getGlobalInstallRoot

src/utils/updateCheck.ts:196–206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194
195/** Best-effort: run `npm root -g` so we can show the install location. */
196export async function getGlobalInstallRoot(): Promise<string | null> {
197 try {
198 const { stdout } = await execFileAsync("npm", ["root", "-g"], {
199 shell: process.platform === "win32",
200 });
201 const trimmed = stdout.trim();
202 return trimmed ? trimmed : null;
203 } catch {
204 return null;
205 }
206}

Callers 1

runUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected