Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal-based editor not working with kart helper #788

Closed
olsen232 opened this issue Feb 10, 2023 · 2 comments
Closed

Terminal-based editor not working with kart helper #788

olsen232 opened this issue Feb 10, 2023 · 2 comments

Comments

@olsen232
Copy link
Collaborator

Describe the bug
Launching a terminal-based editor isn't working from within Kart 0.12.x on macos or linux where the helper mode is enabled. GUI-based editors are unaffected. This is the editor launched in the function run_editor_cmd, that runs $EDITOR

To Reproduce
Steps to reproduce the behaviour:

  1. Make sure you are using Kart 0.12 or later
  2. Make an uncommitted edit to a kart repo - eg, connect to the working copy and change a dataset's title / add a new feature
  3. Run kart commit to commit the edit
  4. Editor fails to open, with error message a something like the following:
    Error: There was a problem with the editor 'nano': Command 'nano /Users/olsen232/mykart/repo123/.kart/COMMIT_EDITMSG' returned non-zero exit status 1.

Expected behaviour
An editor should open, in order that you can write the commit message.

Workaround
Disable the helper by running kart like so:
KART_USE_HELPER=0 kart commit
Or, avoid the need to use the editor by specifying a message up front like so:
kart commit -m "commit message"

Version Info

  • OS: macOS or linux
  • Kart version - 0.12.x
@pfw
Copy link
Contributor

pfw commented Feb 10, 2023

This is due to the helper itself being disconnected from the terminal by the double fork done - there are a couple of cases where this can happen, I believe if GIT_ASKPASS is set and required you will get a similar error. I had considered making a list of commands in the calling process which would automatically skip using the helper as appropriate.

@olsen232
Copy link
Collaborator Author

Fixed as of Kart 0.12.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants