mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
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
This commit is contained in:
commit
4989087fbf
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user