MCPcopy Create free account
hub / github.com/cli/cli / inside

Function inside

evals/src/core/io.ts:35–38  ·  view source on GitHub ↗
(path: string, root: string)

Source from the content-addressed store, hash-verified

33}
34
35export function inside(path: string, root: string): boolean {
36 const rel = relative(root, path);
37 return rel === "" || (!isAbsolute(rel) && rel !== ".." && !rel.startsWith(`..${process.platform === "win32" ? "\\" : "/"}`));
38}
39
40export function isolatedEnvironment(home: string, path: string, modelToken: string): NodeJS.ProcessEnv {
41 return {

Callers 1

trialMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected