MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / copyIfMissing

Function copyIfMissing

scripts/spec-init.ts:71–79  ·  view source on GitHub ↗
(source: string, destination: string)

Source from the content-addressed store, hash-verified

69}
70
71function copyIfMissing(source: string, destination: string): "wrote" | "skipped" {
72 if (existsSync(destination) && !FORCE) {
73 return "skipped";
74 }
75 ensureDir(dirname(destination));
76 copyFileSync(source, destination);
77
78 return "wrote";
79}
80
81/*
82 * Hook payloads for Claude Code (settings.json) and Cursor

Callers

nothing calls this directly

Calls 1

ensureDirFunction · 0.85

Tested by

no test coverage detected