Describe the bug
While trying to reproduce some other errors, I noticed that I can't get the code path that checks for newer versions of lagoon-cli to execute. I'm not sure under what circumstances this check should run.
Additional context
The update check is performed in the PersistentPreRun of the root command, which I understood to be "run before all commands."
Reading the Cobra docs, it says:
The Persistent*Run functions will be inherited by children if they do not declare their own.
Since almost all of the commands have their own pre-run hooks, I think the root update check is never being called.
Describe the bug
While trying to reproduce some other errors, I noticed that I can't get the code path that checks for newer versions of lagoon-cli to execute. I'm not sure under what circumstances this check should run.
Additional context
The update check is performed in the
PersistentPreRunof the root command, which I understood to be "run before all commands."Reading the Cobra docs, it says:
Since almost all of the commands have their own pre-run hooks, I think the root update check is never being called.