Here, exit with status 1 from the River CLI when a problem intrinsic to
Cobra occurred like the user entered an unknown command, or didn't pass
required flag.
Cobra is a little odd in its behavior in that it already prints such a
problem to the terminal, but also returns an error with the same
information. This change looks for the presence of an error and exits
with status 1 if one occurred, but doesn't double print any additional
information about it.
Here, exit with status 1 from the River CLI when a problem intrinsic to Cobra occurred like the user entered an unknown command, or didn't pass required flag.
Cobra is a little odd in its behavior in that it already prints such a problem to the terminal, but also returns an error with the same information. This change looks for the presence of an error and exits with status 1 if one occurred, but doesn't double print any additional information about it.
Fixes #362.