forked from toolshed/abra
refactor: use new internal arg failure func
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package recipe
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
@ -9,6 +10,7 @@ import (
|
||||
|
||||
"coopcloud.tech/abra/catalogue"
|
||||
"coopcloud.tech/abra/cli/formatter"
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/config"
|
||||
|
||||
"github.com/go-git/go-git/v5"
|
||||
@ -46,7 +48,7 @@ var recipeVersionCommand = &cli.Command{
|
||||
Action: func(c *cli.Context) error {
|
||||
recipe := c.Args().First()
|
||||
if recipe == "" {
|
||||
return cli.ShowSubcommandHelp(c)
|
||||
internal.ShowSubcommandHelpAndError(c, errors.New("no recipe provided"))
|
||||
}
|
||||
|
||||
catalogue, err := catalogue.ReadAppsCatalogue()
|
||||
@ -81,7 +83,7 @@ var recipeCreateCommand = &cli.Command{
|
||||
Action: func(c *cli.Context) error {
|
||||
recipe := c.Args().First()
|
||||
if recipe == "" {
|
||||
return cli.ShowSubcommandHelp(c)
|
||||
internal.ShowSubcommandHelpAndError(c, errors.New("no recipe provided"))
|
||||
}
|
||||
|
||||
directory := path.Join(config.APPS_DIR, recipe)
|
||||
|
Reference in New Issue
Block a user