MCPcopy
hub / github.com/coder/mux / shouldSkipInitHook

Function shouldSkipInitHook

src/node/runtime/initHook.ts:32–48  ·  view source on GitHub ↗
(
  params: { skipInitHook?: boolean; trusted?: boolean },
  initLogger: InitLogger
)

Source from the content-addressed store, hash-verified

30 * - !trusted: project not trusted (repo-controlled code must not run)
31 */
32export function shouldSkipInitHook(
33 params: { skipInitHook?: boolean; trusted?: boolean },
34 initLogger: InitLogger
35): boolean {
36 if (params.skipInitHook) {
37 initLogger.logStep("Skipping .mux/init hook (disabled for this task)");
38 return true;
39 }
40 if (!params.trusted) {
41 log.debug(
42 "Skipping .mux/init hook (project not trusted — should not reach here in normal flow)"
43 );
44 initLogger.logStep("Skipping .mux/init hook (project not trusted)");
45 return true;
46 }
47 return false;
48}
49
50/**
51 * Check if .mux/init hook exists and is executable

Callers 1

runWorkspaceInitHookFunction · 0.85

Calls 2

logStepMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected