commitizen / cz-cli

The commitizen command line utility. #BlackLivesMatter
http://commitizen.github.io/cz-cli/
MIT License
16.6k stars 552 forks source link

2.8.0 doesn't make any commits #205

Open LinusU opened 8 years ago

LinusU commented 8 years ago

With version 2.8.0 I can no longer make any commits, where it usually prints the new commit, it doesn't print anything at all. No commit is created, no error message is printed, and the exit code is still 0.

This is on OS X with zsh.

Reverting to 2.7.8 fixes the problem

nelsonpjunior commented 8 years ago

same problem here, It seems that the prompt callback it isn't called.

camwest commented 8 years ago

Looks like https://github.com/commitizen/cz-cli/commit/a538dceddf829b7ca4313fe137afdf1b33587384 broke the build. The upgrade to inquirer change it's API.

In 0.12.0 inquirer the interface was

function prompt(questions: any[], callback: (answers: any) => void))

Now in 1.0.2 of inquirer the signature is

function prompt(questions: any): Promise<answers:any>

https://github.com/commitizen/cz-conventional-changelog/blob/7659b955a86a13a6ce997ce0ff9bbecf9ccc54be/index.js#L32 needs to be updated to use the new signature.

camwest commented 8 years ago

See https://github.com/commitizen/cz-conventional-changelog/pull/18 for proposed fix.

camwest commented 8 years ago

https://github.com/commitizen/cz-cli/pull/206 needs to be merged before the fix will be taken.

LinusU commented 8 years ago

ping @jimthedev, this still seems to be broken :( any updates?

jimthedev commented 8 years ago

@LinusU This was merged and published. Are you using commitizen@2.8.1 and cz-conventional-changelog@1.1.6? I just tested it in OSX and it seems to be working.

LinusU commented 8 years ago

Hmm, I just had a colleague that made a clean install the other day which it didn't work for... I'll have to check Monday which versions he was using...

albinekb commented 8 years ago

Still broken @ version 2.8.1

jimthedev commented 8 years ago

@albinekb Can you let me know what version of cz-conventional-changelog (or another adapter) that you are using?

zacharytelschow commented 8 years ago

I am running into the same issue.

$ npm list -g --depth=0
C:\npm
├── angular-cli@1.0.0-beta.4
├── commitizen@2.8.1
└── cz-jira-smart-commit@1.0.3
zacharytelschow commented 8 years ago

I installed cz-conventional-changelog@1.1.6 and updated my adapter and was able to commit.

I was unsuccessful when attempting to commit with:

jimthedev commented 8 years ago

@zacharytelschow Those adapters probably need to implement the changes in the Inquirer 1.0 API. You can see these changes here: https://github.com/commitizen/cz-conventional-changelog/commit/807b4e5d

At the end of the day we probably need to have some compatibility checking between adapters and the commitizen cli so that if you try to commit and your adapter isn't compatible with the cli you're using then you're prompted to contact the adapter author.

LinusU commented 8 years ago

See #249 for a proposed solution for fixing this in a more long term way

OmgImAlexis commented 2 years ago

Since were now on version 4.x can this be closed?