Skip printing usage if the command syntax is correct
If kubernetes system is not up, we were displaying usage after the error, masking the actual issue in the logs.
I agree to the DCO for all the commits in this PR
@@ -172,7 +172,8 @@ func configureAndRunChecks(cmd *cobra.Command, wout io.Writer, werr io.Writer, s
}
installManifest, err = renderInstallManifest(cmd.Context())
if err != nil {
- return fmt.Errorf("Error rendering install manifest: %v", err)
+ fmt.Fprint(os.Stderr, fmt.Errorf("Error rendering install manifest: %v", err))
+ os.Exit(1)
}
} else {
checks = append(checks, healthcheck.LinkerdConfigChecks)
