tynanbe/shellout

Consider not regarding a non-zero exit code as a failure of `command`

lpil opened this issue · 1 comments

lpil commented

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

Sounds reasonable. Thanks.