MCPcopy Create free account
hub / github.com/cortexkit/magic-context / makeNonExecutable

Function makeNonExecutable

packages/cli/src/lib/find-on-path.test.ts:51–57  ·  view source on GitHub ↗
(dir: string, name: string)

Source from the content-addressed store, hash-verified

49 }
50
51 function makeNonExecutable(dir: string, name: string): string {
52 mkdirSync(dir, { recursive: true });
53 const path = join(dir, name);
54 writeFileSync(path, "not executable\n");
55 if (!isWindows) chmodSync(path, 0o644);
56 return path;
57 }
58
59 it("returns null when PATH is unset", () => {
60 delete process.env.PATH;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected