helix
helix copied to clipboard
Fix process spawning error handling
As mentioned by @dead10ck in https://github.com/helix-editor/helix/pull/2942#discussion_r939606221 if something is printed to stderr it doesn't mean that the process failed, so we need to check the exit code and then print stderr if there is anything. This should also be valid when calling the shell from helix
Now stderr is always logged, (if the status code is zero log::debug is used else if there was an error log::error is used). In case of errors stderr still returns the error, this is because for small error messages it's more convenient to read them in the editor without opening the logs