Cysharp / ProcessX

Simplify call an external process with the async streams in C# 8.0.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there anyway to set acceptable exit code?

hygehyge opened this issue · comments

commented

I have a 3rd party executable that returns 1 when it completes successfully.
And because of ExitCode=1, ProcessX throws ProcessErrorException.
I can handle this situation by try-catch, but I'm happy if there is a way to set "acceptable" ExitCode.

thanks, I've released 1.3.0, its has ProcessX.DefaultAcceptableExitCodes (global) property.
I think set as global is not good.
However, as a provisional API, I did this.
In the future, I will consider the possibility of setting it locally.

commented

Thanks for quick response.
I'll check Ver.1.3.0 later.