File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/@vue/cli/lib/util Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
const chalk = require ( 'chalk' )
2
2
const execa = require ( 'execa' )
3
- const { request } = require ( '@vue/cli-shared-utils' )
3
+ const { hasYarn , request } = require ( '@vue/cli-shared-utils' )
4
4
const inquirer = require ( 'inquirer' )
5
5
const registries = require ( './registries' )
6
6
const { loadOptions, saveOptions } = require ( '../options' )
@@ -17,7 +17,11 @@ function removeSlash (url) {
17
17
let checked
18
18
let result
19
19
20
- module . exports = async function shouldUseTaobao ( command = 'npm' ) {
20
+ module . exports = async function shouldUseTaobao ( command ) {
21
+ if ( ! command ) {
22
+ command = hasYarn ( ) ? 'yarn' : 'npm'
23
+ }
24
+
21
25
// ensure this only gets called once.
22
26
if ( checked ) return result
23
27
checked = true
You can’t perform that action at this time.
0 commit comments