@@ -86,7 +86,7 @@ module.exports = class Creator {
86
86
const packageManager = (
87
87
cliOptions . packageManager ||
88
88
loadOptions ( ) . packageManager ||
89
- ( hasYarn ? 'yarn' : 'npm' )
89
+ ( hasYarn ( ) ? 'yarn' : 'npm' )
90
90
)
91
91
92
92
await clearConsole ( )
@@ -112,7 +112,7 @@ module.exports = class Creator {
112
112
113
113
// intilaize git repository before installing deps
114
114
// so that vue-cli-service can setup git hooks.
115
- if ( hasGit ) {
115
+ if ( hasGit ( ) ) {
116
116
logWithSpinner ( `π` , `Initializing git repository...` )
117
117
await run ( 'git init' )
118
118
}
@@ -156,7 +156,7 @@ module.exports = class Creator {
156
156
}
157
157
158
158
// commit initial state
159
- if ( hasGit ) {
159
+ if ( hasGit ( ) ) {
160
160
await run ( 'git add -A' )
161
161
if ( isTestOrDebug ) {
162
162
await run ( 'git' , [ 'config' , 'user.name' , 'test' ] )
@@ -179,7 +179,7 @@ module.exports = class Creator {
179
179
180
180
async promptAndResolvePreset ( ) {
181
181
// prompt
182
- await clearConsole ( )
182
+ await clearConsole ( true )
183
183
const answers = await inquirer . prompt ( this . resolveFinalPrompts ( ) )
184
184
debug ( 'vue-cli:answers' ) ( answers )
185
185
@@ -320,7 +320,7 @@ module.exports = class Creator {
320
320
321
321
// ask for packageManager once
322
322
const savedOptions = loadOptions ( )
323
- if ( hasYarn && ! savedOptions . packageManager ) {
323
+ if ( ! savedOptions . packageManager && hasYarn ( ) ) {
324
324
outroPrompts . push ( {
325
325
name : 'packageManager' ,
326
326
type : 'list' ,
0 commit comments