Skip to content

"Check for Updates" feature appears to not work #487

@rocketeerbkw

Description

@rocketeerbkw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions