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

providing terminal editor during conflicts hangs the process #499

Closed
kapral18 opened this issue May 6, 2024 · 1 comment · Fixed by #501
Closed

providing terminal editor during conflicts hangs the process #499

kapral18 opened this issue May 6, 2024 · 1 comment · Fixed by #501

Comments

@kapral18
Copy link
Contributor

kapral18 commented May 6, 2024

when providing editor like nano or (n)vim
during a cherry pick conflict resolution I never get to the listing of files
to resolve

it hangs one step before.

image

And waits for a stdin input, which is understandable because nvim as any terminal editor is operating in interactive mode
and expecting stdin to be continuously fed.

Since child_process.spawns default stdio option is pipe it creates an indirection layer between parent and child pipes, making nvim or any other editor hang disconnected while waiting for any input.

One way of fixing this would be to add stdio: inherit to spawn, to remove the unnecessary pipe layer and connect child process to parent io pipes.

I already tested it and it indeed works. Let me know wdyt.

Thanks

@sorenlouv
Copy link
Owner

Hi @kapral18

I already tested it and it indeed works. Let me know wdyt.

Can you open a PR? Don't worry about failing test, I'll gladly help out with that.

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

Successfully merging a pull request may close this issue.

2 participants