MCPcopy
hub / github.com/codeaashu/claude-code / runWithCwdOverride

Function runWithCwdOverride

src/utils/cwd.ts:12–14  ·  view source on GitHub ↗
(cwd: string, fn: () => T)

Source from the content-addressed store, hash-verified

10 * agents to each see their own working directory without affecting each other.
11 */
12export function runWithCwdOverride<T>(cwd: string, fn: () => T): T {
13 return cwdOverrideStorage.run(cwd, fn)
14}
15
16/**
17 * Get the current working directory

Callers 2

wrapWithCwdFunction · 0.85
wrapWithCwdFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected