MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / copyStartTemplates

Function copyStartTemplates

src/commands/run.ts:35–50  ·  view source on GitHub ↗

* Copy templates/start.sh and templates/start.bat to workDir.

(workDir: string)

Source from the content-addressed store, hash-verified

33 * Copy templates/start.sh and templates/start.bat to workDir.
34 */
35function copyStartTemplates(workDir: string): void {
36 const templateDir = path.resolve(
37 new URL("../templates", import.meta.url).pathname,
38 );
39
40 for (const file of ["start.sh", "start.bat"]) {
41 const src = path.join(templateDir, file);
42 const dest = path.join(workDir, file);
43 if (fs.existsSync(src)) {
44 fs.copyFileSync(src, dest);
45 if (file === "start.sh") {
46 fs.chmodSync(dest, 0o755);
47 }
48 }
49 }
50}
51
52export async function runCommand(directory?: string): Promise<void> {
53 const workDir = directory ? path.resolve(directory) : process.cwd();

Callers 1

runCommandFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected