Fix exit code of `docker exec` command not being used
Call os.exit
at the top level so that:
- event metrics are still emitted
- all
defer
ed methods have been run
- Didn't use
os.Exit
inDockerExec
as that would preventdefer
ed methods from being run - Didn't use
os.Exit
in each of the sub commands as that would prevent metric events from being emitted - Didn't use
cobra.Command.RunE
and return anerror
as they aren't all errors and the usage text is displayed
Bug: T307583
TODO
-
Update changelog -
Remove WIP:
prefix from commit message
Edited by Ollie Shotton