fix: only update when really needed

This commit is contained in:
2021-12-27 04:07:52 +01:00
parent c13f438580
commit 06cc5d1cc3
6 changed files with 22 additions and 12 deletions

View File

@ -7,6 +7,7 @@ import (
"coopcloud.tech/abra/cli/internal"
"coopcloud.tech/abra/pkg/autocomplete"
"coopcloud.tech/abra/pkg/lint"
recipePkg "coopcloud.tech/abra/pkg/recipe"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)
@ -21,6 +22,10 @@ var recipeLintCommand = &cli.Command{
Action: func(c *cli.Context) error {
recipe := internal.ValidateRecipe(c)
if err := recipePkg.EnsureUpToDate(recipe.Name); err != nil {
logrus.Fatal(err)
}
tableCol := []string{"ref", "rule", "satisfied", "severity", "resolve"}
table := formatter.CreateTable(tableCol)