Skip to content

Commit 057e5c6

Browse files
jackson-yyyantfu
andauthored
fix: fix switch-cli problem using pnpm (#93)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
1 parent 641e508 commit 057e5c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ function copy(name, version, vue) {
1717
const dest = path.join(dir, name)
1818
let content = fs.readFileSync(src, 'utf-8')
1919
content = content.replace(/'vue'/g, `'${vue}'`)
20+
// unlink for pnpm, #92
21+
try {
22+
fs.unlinkSync(dest)
23+
} catch (error) { }
2024
fs.writeFileSync(dest, content, 'utf-8')
2125
}
2226

0 commit comments

Comments
 (0)