From 001d324a09cc7d630c7b7036f6d7949f5cd4960a Mon Sep 17 00:00:00 2001 From: kjvelarde Date: Wed, 4 Nov 2020 13:17:43 -0500 Subject: [PATCH] Fix #142 & #143 from main branch - fix skip confirmCommit --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index d00e06b..d20004e 100755 --- a/index.js +++ b/index.js @@ -53,14 +53,14 @@ module.exports = { const questions = require('./questions').getQuestions(config, cz); - cz.prompt(questions).then(answers => { + cz.prompt(questions).then((answers) => { if (answers.confirmCommit === 'edit') { temp.open(null, (err, info) => { /* istanbul ignore else */ if (!err) { fs.writeSync(info.fd, buildCommit(answers, config)); fs.close(info.fd, () => { - editor(info.path, code => { + editor(info.path, (code) => { if (code === 0) { const commitStr = fs.readFileSync(info.path, { encoding: 'utf8', @@ -73,7 +73,7 @@ module.exports = { }); } }); - } else if (answers.confirmCommit === 'yes') { + } else if (!answers.confirmCommit || answers.confirmCommit === 'yes') { commit(buildCommit(answers, config)); } else { log.info('Commit has been canceled.');