helix icon indicating copy to clipboard operation
helix copied to clipboard

Fix process spawning error handling

Open PiergiorgioZagaria opened this issue 3 years ago • 0 comments

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

PiergiorgioZagaria avatar Aug 07 '22 06:08 PiergiorgioZagaria

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

PiergiorgioZagaria avatar Aug 12 '22 10:08 PiergiorgioZagaria