mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-21 02:21:00 -05:00
fix: use yarn --version to detect yarn (#4336)
- We never referred to `yarnpkg` anywhere else in the codebase - For the rare case that `yarn` binary is overridden by Hadoop YARN, `yarn --version` will throw (it only supports `yarn version`), therefore it won't pass this check. Fixes #3941. Closes #3942.
This commit is contained in:
@@ -24,7 +24,7 @@ exports.hasYarn = () => {
|
||||
return _hasYarn
|
||||
}
|
||||
try {
|
||||
execSync('yarnpkg --version', { stdio: 'ignore' })
|
||||
execSync('yarn --version', { stdio: 'ignore' })
|
||||
return (_hasYarn = true)
|
||||
} catch (e) {
|
||||
return (_hasYarn = false)
|
||||
|
||||
Reference in New Issue
Block a user