forked from toolshed/abra
refactor(recipe): remove remaining usage of old recipe struct
This commit is contained in:
@ -8,7 +8,6 @@ import (
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
"coopcloud.tech/abra/pkg/lint"
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
recipePkg "coopcloud.tech/abra/pkg/recipe"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
@ -29,8 +28,7 @@ var recipeLintCommand = cli.Command{
|
||||
Action: func(c *cli.Context) error {
|
||||
recipe := internal.ValidateRecipe(c)
|
||||
|
||||
r := recipePkg.Get2(recipe.Name)
|
||||
if err := r.Ensure(internal.Chaos, internal.Offline); err != nil {
|
||||
if err := recipe.Ensure(internal.Chaos, internal.Offline); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@ -47,7 +45,7 @@ var recipeLintCommand = cli.Command{
|
||||
}
|
||||
|
||||
skipped := false
|
||||
if rule.Skip(r) {
|
||||
if rule.Skip(recipe) {
|
||||
skipped = true
|
||||
}
|
||||
|
||||
@ -58,7 +56,7 @@ var recipeLintCommand = cli.Command{
|
||||
|
||||
satisfied := false
|
||||
if !skipped {
|
||||
ok, err := rule.Function(r)
|
||||
ok, err := rule.Function(recipe)
|
||||
if err != nil {
|
||||
log.Warn(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user