mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 18:10:21 +00:00
Feat: enable unknown flags (#6303)
Signed-off-by: yyzxw <1020938856@qq.com>
This commit is contained in:
@@ -75,6 +75,10 @@ func NewCoreCommand() *cobra.Command {
|
||||
return run(signals.SetupSignalHandler(), s)
|
||||
},
|
||||
SilenceUsage: true,
|
||||
FParseErrWhitelist: cobra.FParseErrWhitelist{
|
||||
// Allow unknown flags for backward-compatibility.
|
||||
UnknownFlags: true,
|
||||
},
|
||||
}
|
||||
|
||||
fs := cmd.Flags()
|
||||
|
||||
@@ -60,6 +60,10 @@ func NewCommandWithIOStreams(ioStream util.IOStreams) *cobra.Command {
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
},
|
||||
FParseErrWhitelist: cobra.FParseErrWhitelist{
|
||||
// Allow unknown flags for backward-compatibility.
|
||||
UnknownFlags: true,
|
||||
},
|
||||
}
|
||||
|
||||
scheme := common.Scheme
|
||||
|
||||
Reference in New Issue
Block a user