-
Notifications
You must be signed in to change notification settings - Fork 472
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
With edit.hardlink disabled, chezmoi has nonzero exit status after exiting editor #3574
Comments
I'm unable to reproduce this problem on macOS with nvim v0.9.5 and chezmoi v2.46.1. For me, the autocommand works as a expected and chezmoi applies the file on write and exits successfully. Could you give steps to reproduce the problem in an isolated environment, e.g. a docker container? Alternatively, if you add
|
I upgraded to 2.46.1, and am running neovim 0.9.5 as well. Still getting the error. This is on Ubuntu 20.04. The debug logging disappears when nvim exits, so I can only get that logging when I write the buffer using
I can reproduce this on Arch Linux with the same versions of chezmoi and neovim. |
Will have to wait until later to try to reproduce in Docker. |
One weird detail: On Arch Linux, I forgot to add the chezmoi.toml, and I still see the same error. Also, files open in |
Ah, I can now reproduce this. Interestingly, the autocmd works when you write the file from nvim ( |
Yeah, the autocmd works in both cases ( |
So, it turns out that chezmoi is doing the right thing here. nvim is exiting with exit code 134, which is non-zero and therefore indicates failure. Exit code 134 typically means that the process received a SIGABRT. chezmoi is faithfully reporting nvim's self-reported failure. #3577 improves chezmoi's logging of all subprocesses it runs. This is definitely a bug in NeoVim. I can reproduce it without involving chezmoi. I'll create an issue there. |
I've opened neovim/neovim#27499. As this is a bug in Neovim, I'll close this issue. |
Excellent, thanks so much for looking into it. |
Describe the bug
Per https://github.com/twpayne/chezmoi/pull/3573/files, I disabled
edit.hardlink
to be able to use an autocommand to automatically apply changes. However, when writing a buffer and exiting neovim via:wq
, chezmoi exits with nonzero exit status, and the following is written to stderr:To reproduce
edit.hardlink
using the following in~/.config/chezmoi/chezmoi.toml
:chezmoi edit ~/path/to/file
:wq
.NOTE: The nonzero exit status only happens when saving and exiting at the same time. If you separately use
:w
to save the buffer, and:q
to exit, the changes are applied and chezmoi exits normally.Expected behavior
chezmoi exits normally
Output of command with the
--verbose
flagNo additional output
Output of
chezmoi doctor
The text was updated successfully, but these errors were encountered: