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

fix: async.run_command: report error exit code and stderr #2896

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

merrilymeredith
Copy link
Contributor

I ran into an error like #2733 when opening a project where go was unable to start, and noticed async.run_command didn't report an error at all.

This adds a check for the exit code of the command, reporting that back to the user with stderr output, and changes the existing error check: jobid -1 is returned when the command can't start at all, and there shouldn't be any stderr output at that point either. Normally, you could get further detail "errno" style, but i don't see that this is exposed by the job api.

Example after fix:

2023-11-14 13_56_35-

It's possible merging this will add some insight into the ways people are still running into #2733 - though it doesn't mess with the actual place where mod_cache is nil and emitting that message.

jobid -1 is returned when the command can't start at all, there
shouldn't be any stderr either.  normally you could get further detail
"errno" style, but i don't see that this is exposed by the job api.
@merrilymeredith merrilymeredith force-pushed the async_run_error_handling branch from 1d49415 to 79bf739 Compare November 14, 2023 22:06
@glepnir
Copy link
Member

glepnir commented Nov 15, 2023

make sense thanks.

@glepnir glepnir merged commit d5d7412 into neovim:master Nov 15, 2023
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.

2 participants