Skip to content

Commit

Permalink
fix: fix switch-cli problem using pnpm (#93)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
jackson-yyy and antfu committed Aug 14, 2021
1 parent 641e508 commit 057e5c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/utils.js
Expand Up @@ -17,6 +17,10 @@ function copy(name, version, vue) {
const dest = path.join(dir, name)
let content = fs.readFileSync(src, 'utf-8')
content = content.replace(/'vue'/g, `'${vue}'`)
// unlink for pnpm, #92
try {
fs.unlinkSync(dest)
} catch (error) { }
fs.writeFileSync(dest, content, 'utf-8')
}

Expand Down

0 comments on commit 057e5c6

Please sign in to comment.