Skip to content

Commit

Permalink
Merge pull request kubernetes#4367 from vmarmol/print-client
Browse files Browse the repository at this point in the history
Print client version before evaluating server's.
  • Loading branch information
saad-ali committed Feb 12, 2015
2 parents 7d43971 + d158bbd commit c216b26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/kubectl/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ import (
)

func GetVersion(w io.Writer, kubeClient client.Interface) {
GetClientVersion(w)

serverVersion, err := kubeClient.ServerVersion()
if err != nil {
fmt.Printf("Couldn't read version from server: %v\n", err)
os.Exit(1)
}

GetClientVersion(w)
fmt.Fprintf(w, "Server Version: %#v\n", *serverVersion)
}

Expand Down

0 comments on commit c216b26

Please sign in to comment.