MSP-5014 Replace call flag.CheckGlobal(ctx) by calling Before
This commit is contained in:
1 parent
5dbd07dc03
commit
ff2922cf1e
7 files changed
+29
-64
No files matched your search
+1
-3
@@ -15,6 +15,7 @@ func Delete() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "delete",
|
||||
Usage: "delete configuration by module_name",
|
||||
Before: flag.CheckGlobal,
|
||||
Action: deleteComm.action,
|
||||
BashComplete: bash.Get(bash.ModuleName, bash.ModuleData).Complete,
|
||||
}
|
||||
@@ -25,9 +26,6 @@ var deleteComm deleteCommand
|
||||
type deleteCommand struct{}
|
||||
|
||||
func (d deleteCommand) action(ctx *cli.Context) error {
|
||||
if err := flag.CheckGlobal(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
moduleName := ctx.Args().First()
|
||||
pathObject := ctx.Args().Get(1)
|
||||
|
||||
|
||||
Reference in new issue
Block a user