Skip to content

Commit

Permalink
Use --output=yaml instead of --short since that's deprecated, too
Browse files Browse the repository at this point in the history
kubectl 1.25.4 bare `version` output says that `version --short` is
deprecated, but I missed the note that the output of `version --short`
will become the output of bare `version`. What's going away is what's
displayed by bare `version` presently. Since we probably still want the
long output in some form, let's dump it in YAML.

It's YAML all the way down, right?
  • Loading branch information
colindean committed Dec 22, 2022
1 parent 08248a6 commit 4ab1856
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/vela-kubernetes/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func versionCmd(c *Config) *exec.Cmd {
}

// add flag for version kubectl command
flags = append(flags, "version", "--short")
flags = append(flags, "version", "--output=yaml")

return exec.Command(_kubectl, flags...)
}
2 changes: 1 addition & 1 deletion cmd/vela-kubernetes/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestKubernetes_versionCmd(t *testing.T) {
fmt.Sprintf("--context=%s", c.Context),
fmt.Sprintf("--namespace=%s", c.Namespace),
"version",
"--short",
"--output=yaml",
)

got := versionCmd(c)
Expand Down

0 comments on commit 4ab1856

Please sign in to comment.