cmd/root, cmd/run: Handle printing all errors but the CLI parsing ones#1533
Conversation
4ff621c to
17eea5f
Compare
|
Build failed. ❌ unit-test NODE_FAILURE Node request 200-0007562451 failed in 0s |
|
recheck |
|
Build succeeded. ✔️ unit-test SUCCESS in 5m 38s |
|
Build succeeded. ✔️ unit-test SUCCESS in 5m 37s |
It shouldn't be necessary to use the --assumeyes option when creating a Toolbx container, if the corresponding image is already present in the local containers/storage image store. It's harmful to test it with the option, even when it shouldn't be needed, because it's off by default and most users won't enable it. Therefore, it's better to test the most common scenario that most users will encounter. containers#1536
This will make it easier to propagate the exit codes of subordinate processes through an exitError instance, when toolbox(1) is invoked inside a container, and invocation is forwarded to the host. Cobra doesn't honour the root command's SilenceErrors, if an error occurred when parsing the command line for a command, even though the command was found. However, Cobra does honour SilenceErrors, if the error occurred afterwards. Therefore, to avoid setting SilenceErrors in each and every command, it was set in the PersistentPreRunE hook (ie., preRun), which is called after all command line parsing has been successfully completed. containers#957
dc88e73 to
ee90bc9
Compare
|
Build succeeded. ✔️ unit-test SUCCESS in 4m 14s |
|
Build succeeded. ✔️ unit-test SUCCESS in 5m 08s |
This will make it easier to propagate the exit codes of subordinate
processes through an
exitErrorinstance, whentoolbox(1)is invokedinside a container, and invocation is forwarded to the host.
Cobra doesn't honour the root command's
SilenceErrors, if an erroroccurred when parsing the command line for a command, even though the
command was found. However, Cobra does honour
SilenceErrors, if theerror occurred afterwards.
Therefore, to avoid setting
SilenceErrorsin each and every command, itwas set in the
PersistentPreRunEhook (ie.,preRun), which is calledafter all command line parsing has been successfully completed.
#957