MCPcopy Index your code
hub / github.com/codeaashu/claude-code / executeEnvHooks

Function executeEnvHooks

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

Source from the content-addressed store, hash-verified

4239}
4240
4241async function executeEnvHooks(
4242 hookInput: HookInput,
4243 timeoutMs: number,
4244): Promise<{
4245 results: HookOutsideReplResult[]
4246 watchPaths: string[]
4247 systemMessages: string[]
4248}> {
4249 const results = await executeHooksOutsideREPL({ hookInput, timeoutMs })
4250 if (results.length > 0) {
4251 invalidateSessionEnvCache()
4252 }
4253 const watchPaths = results.flatMap(r => r.watchPaths ?? [])
4254 const systemMessages = results
4255 .map(r => r.systemMessage)
4256 .filter((m): m is string => !!m)
4257 return { results, watchPaths, systemMessages }
4258}
4259
4260export function executeCwdChangedHooks(
4261 oldCwd: string,

Callers 2

executeCwdChangedHooksFunction · 0.85
executeFileChangedHooksFunction · 0.85

Calls 2

executeHooksOutsideREPLFunction · 0.85

Tested by

no test coverage detected