Skip to content

Commit

Permalink
fix resolveYarn error on yarn version >= 2 (neoclide#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanduc987 authored Nov 24, 2022
1 parent 29a90db commit da1c297
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export class Resolver {
let exists = fs.existsSync(folder)
if (exists) this._yarnFolder = folder
return exists ? folder : ''
}).catch(() => {
// yarn global had been removed since version 2
// if yarn global dir return error then its version >=2, just return empty
return ''
})
}

Expand Down

0 comments on commit da1c297

Please sign in to comment.