Skip to content

CLI continues execution after log.Errorf() instead of returning error #655

@AnvayKharb

Description

@AnvayKharb

In multiple Harbor CLI commands, when an error occurs it is logged using log.Errorf() but the function does not return the error. Execution continues after the error, causing variables like projectName, repoName, or reference to be empty or invalid.

Because of this, the command does not fail immediately and instead proceeds with incorrect state, leading to silent failures and confusing downstream behavior. The CLI appears to run successfully even though a critical error has already occurred.

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