Skip to content

Commit

Permalink
Fix required argument check for upgrade actions.
Browse files Browse the repository at this point in the history
For `upgrade status` and `upgrade cancel` the `--cluster` argument is
required.  However, it wasn't being checked and as a result, the  error
that wasn't indicative of what really was wrong. So, we just add the
necessary validation step to the actions.
  • Loading branch information
abrightwell committed May 31, 2022
1 parent 9625e06 commit 97e4224
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cb/cluster_upgrade.cr
Expand Up @@ -45,6 +45,8 @@ end
# Action to cancel cluster upgrade.
class CB::UpgradeCancel < CB::Upgrade
def run
validate

c = client.get_cluster cluster_id
print_team_slash_cluster c

Expand All @@ -56,6 +58,8 @@ end
# Action to get the cluster upgrade status.
class CB::UpgradeStatus < CB::Upgrade
def run
validate

c = client.get_cluster cluster_id
print_team_slash_cluster c

Expand Down

0 comments on commit 97e4224

Please sign in to comment.