MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / executeCwdChangedHooks

Function executeCwdChangedHooks

src/utils/hooks.ts:4419–4435  ·  view source on GitHub ↗
(
  oldCwd: string,
  newCwd: string,
  timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
)

Source from the content-addressed store, hash-verified

4417}
4418
4419export function executeCwdChangedHooks(
4420 oldCwd: string,
4421 newCwd: string,
4422 timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
4423): Promise<{
4424 results: HookOutsideReplResult[]
4425 watchPaths: string[]
4426 systemMessages: string[]
4427}> {
4428 const hookInput: CwdChangedHookInput = {
4429 ...createBaseHookInput(undefined),
4430 hook_event_name: 'CwdChanged',
4431 old_cwd: oldCwd,
4432 new_cwd: newCwd,
4433 }
4434 return executeEnvHooks(hookInput, timeoutMs)
4435}
4436
4437export function executeFileChangedHooks(
4438 filePath: string,

Callers 1

onCwdChangedForHooksFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeEnvHooksFunction · 0.85

Tested by

no test coverage detected