8000 fix: use `yarn --version` to detect yarn (#4336) · vuejs/vue-cli@470c94e · GitHub
[go: up one dir, main page]

Skip to content

Commit 470c94e

Browse files
committed
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. (cherry picked from commit 448dbdb)
1 parent 4e586c0 commit 470c94e

File tree

1 file changed

+1
-1
lines changed
  • packages/@vue/cli-shared-utils/lib

1 file changed

+1
-1
lines changed

packages/@vue/cli-shared-utils/lib/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ exports.hasYarn = () => {
2424
return _hasYarn
2525
}
2626
try {
27-
execSync('yarnpkg --version', { stdio: 'ignore' })
27+
execSync('yarn --version', { stdio: 'ignore' })
2828
return (_hasYarn = true)
2929
} catch (e) {
3030
return (_hasYarn = false)

0 commit comments

Comments
 (0)
0