Skip to content

Commit bb103bd

Browse files
nrjdalalclaude
andcommitted
fix: remove existing dest before symlink creation, don't count failures
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5e59e36 commit bb103bd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

bin/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,11 @@ const main = async () => {
357357
await fs.promises.mkdir(path.dirname(dest), { recursive: true })
358358
if (lstat.isSymbolicLink()) {
359359
const linkTarget = await fs.promises.readlink(src)
360-
await fs.promises.symlink(linkTarget, dest).catch(() => {})
361-
copiedFiles++
360+
try {
361+
await fs.promises.rm(dest, { force: true })
362+
await fs.promises.symlink(linkTarget, dest)
363+
copiedFiles++
364+
} catch {}
362365
} else if (lstat.isDirectory()) {
363366
await fs.promises.mkdir(dest, { recursive: true })
364367
const files = await copyDir(src, dest)

0 commit comments

Comments
 (0)