You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library currently considers a process successfully being run and then returning a non-zero exit code as a failure of the command function. I think this is mixing up two different things, the running of a command, and what the output of that command was, and other than in simple cases makes it harder to use library as one cannot easily distinguish between the errors at the different level.
I would have the command function only return an error if it failed to run the command.
This would mirror the HTTP libraries where sending a HTTP request and getting back a 400 or a 500 is still a successful HTTP request.
Thanks,
Louis
The text was updated successfully, but these errors were encountered:
lpil
changed the title
Do not consider a non-zero exit code as a failure of command
Consider not regarding a non-zero exit code as a failure of commandFeb 28, 2024
Hello!
This library currently considers a process successfully being run and then returning a non-zero exit code as a failure of the command function. I think this is mixing up two different things, the running of a command, and what the output of that command was, and other than in simple cases makes it harder to use library as one cannot easily distinguish between the errors at the different level.
I would have the command function only return an error if it failed to run the command.
This would mirror the HTTP libraries where sending a HTTP request and getting back a 400 or a 500 is still a successful HTTP request.
Thanks,
Louis
The text was updated successfully, but these errors were encountered: