forked from toolshed/abra
refactor: centralise app name validation
This commit is contained in:
@ -2,7 +2,6 @@ package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/client"
|
||||
@ -22,10 +21,7 @@ vigilant, as your swarm installation will consider any previously attached
|
||||
volumes as eligiblef or pruning once undeployed.
|
||||
`,
|
||||
Action: func(c *cli.Context) error {
|
||||
appName := c.Args().First()
|
||||
if appName == "" {
|
||||
internal.ShowSubcommandHelpAndError(c, errors.New("no app name provided"))
|
||||
}
|
||||
appName := internal.ValidateAppNameArg(c)
|
||||
|
||||
appFiles, err := config.LoadAppFiles("")
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user