MCPcopy Create free account
hub / github.com/afar1/fieldtheory-cli / execFile

Function execFile

tests/app-install.test.ts:74–86  ·  view source on GitHub ↗
(file: string, args: readonly string[])

Source from the content-addressed store, hash-verified

72 }) as typeof fetch;
73
74 const execFile = async (file: string, args: readonly string[]) => {
75 calls.push({ file, args });
76 if (file === 'hdiutil' && args[0] === 'attach') {
77 const mountPoint = String(args[args.indexOf('-mountpoint') + 1]);
78 const appContents = path.join(mountPoint, 'Field Theory.app', 'Contents');
79 fs.mkdirSync(appContents, { recursive: true });
80 fs.writeFileSync(path.join(appContents, 'Info.plist'), 'fake plist');
81 }
82 if (file === 'ditto') {
83 fs.cpSync(String(args[0]), String(args[1]), { recursive: true });
84 }
85 return { stdout: '', stderr: '' };
86 };
87
88 try {
89 const result = await installFieldTheoryApp({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected