Skip to content

Commit 6409363

Browse files
authored
fix: skip checking git gpgSign config (#5869)
Fix the issue described at #5823 (comment) This simplifies the logic, thus less error-prone. The error message is still correct anyway.
1 parent b94da37 commit 6409363

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Diff for: packages/@vue/cli/lib/Creator.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -259,22 +259,13 @@ module.exports = class Creator extends EventEmitter {
259259

260260
// commit initial state
261261
let gitCommitFailed = false
262-
let gpgSign = false
263262
if (shouldInitGit) {
264263
await run('git add -A')
265264
if (isTestOrDebug) {
266265
await run('git', ['config', 'user.name', 'test'])
267266
await run('git', ['config', 'user.email', '[email protected]'])
268267
await run('git', ['config', 'commit.gpgSign', 'false'])
269268
}
270-
gpgSign = await (async () => {
271-
const { stdout: gpgSignConfig } = await run('git', [
272-
'config',
273-
'--get',
274-
'commit.gpgSign'
275-
])
276-
return gpgSignConfig === 'true'
277-
})()
278269
const msg = typeof cliOptions.git === 'string' ? cliOptions.git : 'init'
279270
try {
280271
await run('git', ['commit', '-m', msg, '--no-verify'])
@@ -298,7 +289,7 @@ module.exports = class Creator extends EventEmitter {
298289

299290
if (gitCommitFailed) {
300291
warn(
301-
`Skipped git commit due to missing username and email in git config${gpgSign ? ' or failed to sign commit' : ''}.\n` +
292+
`Skipped git commit due to missing username and email in git config, or failed to sign commit.\n` +
302293
`You will need to perform the initial commit yourself.\n`
303294
)
304295
}

0 commit comments

Comments
 (0)