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

Function makeExecutable

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

Source from the content-addressed store, hash-verified

41 });
42
43 function makeExecutable(dir: string, name: string): string {
44 mkdirSync(dir, { recursive: true });
45 const path = join(dir, name);
46 writeFileSync(path, isWindows ? "@echo off\n" : "#!/bin/sh\necho hi\n");
47 if (!isWindows) chmodSync(path, 0o755);
48 return path;
49 }
50
51 function makeNonExecutable(dir: string, name: string): string {
52 mkdirSync(dir, { recursive: true });

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected