MCPcopy Create free account
hub / github.com/SethGammon/Citadel / copyDirIfMissing

Function copyDirIfMissing

hooks_src/init-project.js:85–96  ·  view source on GitHub ↗

* Copy files from src to dest, but only if they don't already exist. * Preserves user customizations to templates.

(src, dest)

Source from the content-addressed store, hash-verified

83 // surface it instead of failing in silence.
84 if (!(error instanceof RuntimeDetectionError)) throw error;
85 runtimeDetectionError = error;
86 runtime = configControl.UNKNOWN_LOCAL_RUNTIME;
87 }
88 const context = configControl.loadActivationContext(PROJECT_ROOT, { runtime });
89 const decision = configControl.preflightHook(context, 'init-project');
90 return {
91 allowed: ['enabled', 'degraded'].includes(decision.status),
92 decision,
93 runtime: runtime.id,
94 bundles: context.receipt?.bundles?.effective || [],
95 runtimeDetectionError,
96 };
97}
98
99function planningDirs(bundles) {

Callers 1

mainFunction · 0.85

Calls 1

ensureDirFunction · 0.70

Tested by

no test coverage detected