Skip to content

uninstall-backup-restore.sh failing on older oc client versions #257

Description

@mikemoroney

With oc client version 4.16 installed the script fails with

oc version: null

Solution replace this line

[ -z "$OCVER_FULL"  ] && OCVER_FULL=$(oc version --client -o json | jq -r '.clientVersion.gitVersion')

with

[ -z "$OCVER_FULL" -o "$OCVER_FULL" = "null" ] && OCVER_FULL=$(oc version --client -o json | jq -r '.clientVersion.gitVersion')

as null is not non-zero value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions