Skip to content

Commit

Permalink
Merge pull request #123 from Tenzer/add-info-about-version-flag
Browse files Browse the repository at this point in the history
Add tip about the `--version` flag to error output
  • Loading branch information
lizrice authored May 11, 2018
2 parents b3fc842 + 39d94df commit 9f5c856
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func getKubeVersion() string {
if err != nil {
_, err = exec.LookPath("kubelet")
if err != nil {
exitWithError(fmt.Errorf("Version check failed: need kubectl or kubelet binaries to get kubernetes version"))
exitWithError(fmt.Errorf("Version check failed: need kubectl or kubelet binaries to get kubernetes version.\nAlternately, you can specify the version with --version"))
}
return getKubeVersionFromKubelet()
}
Expand All @@ -240,7 +240,7 @@ func getKubeVersionFromKubectl() string {
func getKubeVersionFromKubelet() string {
cmd := exec.Command("kubelet", "--version")
out, err := cmd.CombinedOutput()

if err != nil {
continueWithError(fmt.Errorf("%s", out), "")
}
Expand Down

0 comments on commit 9f5c856

Please # to comment.