MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / setHome

Function setHome

__tests__/security.test.ts:459–464  ·  view source on GitHub ↗

Point `os.homedir()` at `home`: it reads USERPROFILE on Windows, HOME elsewhere.

(home: string | undefined, profile: string | undefined = home)

Source from the content-addressed store, hash-verified

457
458/** Point `os.homedir()` at `home`: it reads USERPROFILE on Windows, HOME elsewhere. */
459function setHome(home: string | undefined, profile: string | undefined = home): void {
460 if (home === undefined) delete process.env.HOME;
461 else process.env.HOME = home;
462 if (profile === undefined) delete process.env.USERPROFILE;
463 else process.env.USERPROFILE = profile;
464}
465
466/**
467 * A temp folder holding a private home with its own `.ssh` and `.config`, and

Callers 2

sensitiveFixtureFunction · 0.70
security.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected