8000 fix(cli-test-utils): fix `initGit` option (#4224) · vuejs/vue-cli@6324444 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6324444

Browse files
solazzzhaoqunjiang
authored andcommitted
fix(cli-test-utils): fix initGit option (#4224)
fixes #4223 (cherry picked from commit 16e379d)
1 parent 745935a commit 6324444

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/@vue/cli-test-utils/createTestProject.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const fs = require('fs-extra')
22
const path = require('path')
33
const execa = require('execa')
44

5-
module.exports = function createTestProject (name, preset, cwd, initGit) {
5+
module.exports = function createTestProject (name, preset, cwd, initGit = true) {
66
delete process.env.VUE_CLI_SKIP_WRITE
77

88
cwd = cwd || path.resolve(__dirname, '../../test')
@@ -48,8 +48,7 @@ module.exports = function createTestProject (name, preset, cwd, initGit) {
4848
'--force',
4949
'--inlinePreset',
5050
JSON.stringify(preset),
51-
'--git',
52-
initGit ? 'init' : 'false'
51+
initGit ? '--git' : '--no-git'
5352
]
5453

5554
const options = {

0 commit comments

Comments
 (0)
0