iOSConsole should return non-zero on an error
Closed this issue · 3 comments
Right now it always returns 0. This makes it difficult to use in scripts, etc. where we need to know whether things succeeded or not.
Can a use-case be provided please? I don't think I see the benefit in attaching the return code back to every potential error case in the code for a use-case it wasn't originally intended for.
We (https://github.com/facebook/buck) use iOSConsole to install .app
bundles to device by spawning it via the shell. If the install fails for whatever reason (invalid profile, etc) we need to have a way to detect the failure.
Returning non-zero on failure is a convention that pretty much every command-line tool has.
I can understand the desire to have that functionality but I wonder if it wouldn't be more practical to simply write a tool to do only the install process rather than tie it to this nebulous utility that I wrote as an example of using the framework.
That said, I don't have an issue if you were to make a PR that returned an error code back to main
for each of the features of the utility to give it the desired functionality.