MCPcopy Create free account
hub / github.com/arctic-cli/interface / prepareBinDirectory

Function prepareBinDirectory

packages/arctic/script/postinstall.mjs:71–86  ·  view source on GitHub ↗
(binaryName)

Source from the content-addressed store, hash-verified

69}
70
71function prepareBinDirectory(binaryName) {
72 const binDir = path.join(__dirname, "bin")
73 const targetPath = path.join(binDir, binaryName)
74
75 // Ensure bin directory exists
76 if (!fs.existsSync(binDir)) {
77 fs.mkdirSync(binDir, { recursive: true })
78 }
79
80 // Remove existing binary/symlink if it exists
81 if (fs.existsSync(targetPath)) {
82 fs.unlinkSync(targetPath)
83 }
84
85 return { binDir, targetPath }
86}
87
88function symlinkBinary(sourcePath, binaryName) {
89 const { targetPath } = prepareBinDirectory(binaryName)

Callers 1

symlinkBinaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected