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

Function executeEnvHooks

src/utils/hooks.ts:4400–4417  ·  view source on GitHub ↗
(
  hookInput: HookInput,
  timeoutMs: number,
)

Source from the content-addressed store, hash-verified

4398}
4399
4400async function executeEnvHooks(
4401 hookInput: HookInput,
4402 timeoutMs: number,
4403): Promise<{
4404 results: HookOutsideReplResult[]
4405 watchPaths: string[]
4406 systemMessages: string[]
4407}> {
4408 const results = await executeHooksOutsideREPL({ hookInput, timeoutMs })
4409 if (results.length > 0) {
4410 invalidateSessionEnvCache()
4411 }
4412 const watchPaths = results.flatMap(r => r.watchPaths ?? [])
4413 const systemMessages = results
4414 .map(r => r.systemMessage)
4415 .filter((m): m is string => !!m)
4416 return { results, watchPaths, systemMessages }
4417}
4418
4419export function executeCwdChangedHooks(
4420 oldCwd: string,

Callers 2

executeCwdChangedHooksFunction · 0.85
executeFileChangedHooksFunction · 0.85

Calls 2

executeHooksOutsideREPLFunction · 0.85

Tested by

no test coverage detected