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
You're right, it is a bit cumbersome the way it is now. The problem with your suggestion is that it makes it more cumbersome to get the result of a failing command. And it is a breaking change, so it would have to be in SwiftShell 6.0. But your use case is probably more common.
I've been wanting to improve the API for a long time now, but I just haven't been able to come up with a good solution that handles all aspects well, like error handling, synchronicity, shell interpreter, stdin, joined or separate stdout/stderror, printing output, piping output to another command, and probably even more that I haven't thought of yet.
I already mentioned this request in #92. I think it is a very common use case to make all run commands throwable.
What I would like to avoid is the extra check for the error and manually print the error like this:
The following would be much cleaner imho and the failure reason could be part of the error or an underlying error maybe:
Originally posted by @stherold in #92 (comment)
The text was updated successfully, but these errors were encountered: