Unverified Commit 4989087f authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #58030 from ahmetb/fix-fmt

Automatic merge from submit-queue (batch tested with PRs 57581, 58030). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. cmd/kubectl: fix broken error formatting for run This patch adds missing value to a format string (%s) in --restart flag validation for "kubectl run". "kubectl run --restart=foo" was giving error: error: invalid restart policy: %!s(MISSING) Now it says: error: invalid restart policy: foo /release-note-none
parents 39ea0d51 ee035132
......@@ -501,7 +501,7 @@ func getRestartPolicy(cmd *cobra.Command, interactive bool) (api.RestartPolicy,
case api.RestartPolicyNever:
return api.RestartPolicyNever, nil
}
return "", cmdutil.UsageErrorf(cmd, "invalid restart policy: %s")
return "", cmdutil.UsageErrorf(cmd, "invalid restart policy: %s", restart)
}
func verifyImagePullPolicy(cmd *cobra.Command) error {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment