commitizen icon indicating copy to clipboard operation
commitizen copied to clipboard

Error with Vim when trying to bump to a new version

Open bitterteriyaki opened this issue 2 years ago • 2 comments

Description

When trying to bump to a new version, an error related to NeoVim (which is my OS editor) occurs:

Vim: Error reading input, exiting...

Vim: Finished.
error: There was a problem with the editor '/usr/bin/nvim'.
Please supply the message using either -m or -F option.

Steps to reproduce

Used command and full output:

$ cz bump -ch

bump: version 0.5.0 → 0.6.0
tag to create: 0.6.0
increment detected: MINOR

[develop c82b2a2] bump: version 0.5.0 → 0.6.0
 2 files changed, 15 insertions(+), 2 deletions(-)

trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
black................................................(no files to check)Skipped
isort (python).......................................(no files to check)Skipped
flake8...............................................(no files to check)Skipped
mypy.................................................(no files to check)Skipped
check yaml...........................................(no files to check)Skipped
commitizen check.........................................................Passed
black................................................(no files to check)Skipped
isort (python).......................................(no files to check)Skipped
flake8...............................................(no files to check)Skipped
mypy.................................................(no files to check)Skipped

Vim: Error reading input, exiting...

Vim: Finished.
error: There was a problem with the editor '/usr/bin/nvim'.
Please supply the message using either -m or -F option.

Current behavior

The commit runs despite the error (I want to change the commit message anyway).

Desired behavior

It was expected to open the Vim editor to customize the commit message.

Screenshots

No response

Environment

  • commitizen version: 2.40.0
  • python version: Python 3.11.1
  • operating system: Linux
Commitizen Version: 2.40.0
Python Version: 3.11.1 (main, Jan 27 2023, 13:24:11) [GCC 12.2.1 20230111]
Operating System: Linux

bitterteriyaki avatar Mar 20 '23 15:03 bitterteriyaki

This is not related to pre-commit. This can be tested with cz bump --no-verify.

In my case, this bug was triggered by my global git config that had tag.gpgsign = true set. The workaround I found was to set gpg_sign in commitizen.

If that is not the case for you, cz --debug bump helped me debug this.

ypid-work avatar May 14 '24 11:05 ypid-work

Hi, @ypid-work. Thank you for the reply. I have some personal issues at the moment, but I will test it as soon as I can.

bitterteriyaki avatar May 26 '24 00:05 bitterteriyaki

Hey, @ypid-work. The error that I was getting is not happening anymore, probably because the library got many updates since I created this issue. Good work, by the way!

I'm closing this issue.

bitterteriyaki avatar Jul 02 '24 00:07 bitterteriyaki