Skip to content

Commit

Permalink
fix: Don't warn about static master removal in "jx completion ..."
Browse files Browse the repository at this point in the history
This is purely a helper command, so there's no reason to have the
warning here, and it results in breaking tab completion.

fixes #6975

Signed-off-by: Andrew Bayer <[email protected]>
  • Loading branch information
abayer authored and jenkins-x-bot committed Apr 1, 2020
1 parent 490af12 commit 403d8b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ func logWarningForRemovalOfStaticMasters(cmd *cobra.Command, args []string) {
return
}

// Just return if this is "jx completion (shell)".
if commandHasParentName(cmd, "completion") {
return
}

shouldWarn := false
if commandHasParentName(cmd, "create cluster") {
shouldWarn = isStaticMasterInstall(cmd)
Expand Down

0 comments on commit 403d8b1

Please sign in to comment.