Merge pull request #53631 from dixudx/enforce_cobra_required_flags
Automatic merge from submit-queue. 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>. update vendor spf13/cobra to enforce required flags **What this PR does / why we need it**: spf13/cobra#502 has enforced checking flags that marked as required, an error will be raised if unset. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:fixes #54855 xref #48400 fixes kubernetes/kubectl#121 **Special notes for your reviewer**: /assign @liggitt @eparis **Release note**: ```release-note kubectl now enforces required flags at a more fundamental level ```
This commit is contained in:
@@ -65,7 +65,8 @@ func NewCmdCreate(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command {
|
||||
var options CreateOptions
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "create -f FILENAME",
|
||||
Use: "create -f FILENAME",
|
||||
DisableFlagsInUseLine: true,
|
||||
Short: i18n.T("Create a resource from a file or from stdin."),
|
||||
Long: createLong,
|
||||
Example: createExample,
|
||||
|
Reference in New Issue
Block a user