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

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

Open
lpil opened this issue Feb 28, 2024 · 1 comment
Open

Comments

@lpil
Copy link

lpil commented Feb 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

@lpil 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 command Feb 28, 2024
@tynanbe
Copy link
Owner

tynanbe commented Feb 28, 2024

Sounds reasonable. Thanks.

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

No branches or pull requests

2 participants