UNIX grep exits non-zero if it didn’t find any matches.
Unfortunately sys.process.!! throws an exception when this happens.
What is the correct way to exec a subprocess without treating non-zero exit status as an exception.
In general I might still want the stdout of such a process which exited non-zero. In the case of grep there was no stdout by definition, but in general a process has stderr, stdout, and exit status.
I see there is a version of !! which takes a ProcessLogger to handle the stdout and stderr, but it does not handle the exit status. It is still documented to throw an annoying exception of the status is non-zero.
Again, I’d probably check whether Ammonite feels more convenient than raw sys.process. Ammonite % and %% ops behave pretty much like sys.process! and !!, but %% already has a notion of CommandResult.