Skip to content

Commit 807b4e5

Browse files
Cameron Westlandjimthedev
Cameron Westland
authored andcommitted
fix(prompter): resolve issue with new inquirer api (commitizen#18)
1 parent 7659b95 commit 807b4e5

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

index.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,27 @@
33
var wrap = require('word-wrap');
44

55
// This can be any kind of SystemJS compatible module.
6-
// We use Commonjs here, but ES6 or AMD would do just
6+
// We use Commonjs here, but ES6 or AMD would do just
77
// fine.
88
module.exports = {
99

1010
// When a user runs `git cz`, prompter will
1111
// be executed. We pass you cz, which currently
1212
// is just an instance of inquirer.js. Using
1313
// this you can ask questions and get answers.
14-
//
14+
//
1515
// The commit callback should be executed when
1616
// you're ready to send back a commit template
17-
// to git.
18-
//
17+
// to git.
18+
//
1919
// By default, we'll de-indent your commit
2020
// template and will keep empty lines.
2121
prompter: function(cz, commit) {
22-
2322
console.log('\nLine 1 will be cropped at 100 characters. All other lines will be wrapped after 100 characters.\n');
24-
23+
2524
// Let's ask some questions of the user
26-
// so that we can populate our commit
27-
// template.
25+
// so that we can populate our commit
26+
// template.
2827
//
2928
// See inquirer.js docs for specifics.
3029
// You can also opt to use another input
@@ -77,8 +76,8 @@ module.exports = {
7776
name: 'footer',
7877
message: 'List any breaking changes or issues closed by this change:\n'
7978
}
80-
], function(answers) {
81-
79+
]).then(function(answers) {
80+
8281
var maxLineWidth = 100;
8382

8483
var wrapOptions = {

0 commit comments

Comments
 (0)