Skip to content

Conversation

@mirekdlugosz
Copy link
Contributor

Neovim documentation doesn't make it very clear, but checks are handles and need to be closed.

Neovim will close them after time specified in src/nvim/event/loop.c:loop_close(), but at the cost of exit code signifying something went wrong.

I saw the fix in Neovim codebase.

There's one more new_check call in this plugin, in InstallHandle.lua. I think it might need closing as well, but I see it also calls __clear_event_handlers which I am not familiar with.

Fixes #1994

Neovim documentation doesn't make it very clear, but checks are handles
and need to be closed. Neovim will close them after time specified in
`src/nvim/event/loop.c:loop_close()`, but at the cost of exit code
signifying something went wrong.

Fixes mason-org#1994
Copy link
Member

@williamboman williamboman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good catch! And very well written bug report 👍. I added a close call to the check handle in InstallHandle.lua to make sure it gets cleaned up as well

@williamboman williamboman merged commit a1fbecc into mason-org:main Jul 28, 2025
10 checks passed
rahuliyer95 pushed a commit to rahuliyer95/mason.nvim that referenced this pull request Nov 17, 2025
rahuliyer95 pushed a commit to rahuliyer95/mason.nvim that referenced this pull request Nov 17, 2025
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 this pull request may close these issues.

Since eb220f56b67 , nvim --headless -c 'LspInstall <server>' exits with code 1, breaking unattended scripts

2 participants