MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / assertDirectory

Function assertDirectory

projects/runtime-node/src/localPty.ts:33–36  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

31}
32
33async function assertDirectory(cwd: string): Promise<void> {
34 const stat = await fs.stat(cwd)
35 if (!stat.isDirectory()) throw new Error(`cwd is not a directory: ${cwd}`)
36}
37
38function shellCommand(): string {
39 if (process.platform === "win32") return "powershell.exe"

Callers 1

spawnFunction · 0.70

Calls 1

isDirectoryMethod · 0.80

Tested by

no test coverage detected