Closed simonschaufi closed 3 years ago
I don't think the exception code should be abused in this way. Maybe you should instead add a private property and a public getter for the exit code, and maybe add a public static create method to the exception (because changing the constructor is breaking).
The funny thing is that the error code is actually passed on but always 0 because it's never set. Since the output is returned as string and an exception is thrown, a property doesn't make much sense as the exception is the only thing I get if exit code is not 0.
You are free to clone my repo and come up with a better solution by pushing into the branch
But the exception code is nothing to do with an error code?
I just saw that the package is abandoned, so no further development here needed...
See https://github.com/cpliakas/git-wrapper/issues/225
The work continues in https://github.com/symplify/symplify
In case you want to know the exit code of the process for further error handling, it is now passed as error code