From d2110bdfd547874a172c0e51741a3ce0d61dbc34 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Mon, 21 Oct 2024 13:40:39 +0300 Subject: [PATCH] Fix compatibility with the latest version of ek package --- cli/cli.go | 2 +- cli/executor/executor.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/cli.go b/cli/cli.go index 197f56ab..3d0af575 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -118,7 +118,7 @@ func Run(gitRev string, gomod []byte) { if !errs.IsEmpty() { terminal.Error("Options parsing errors:") - terminal.Error(errs.String()) + terminal.Error(errs.Error("- ")) os.Exit(1) } diff --git a/cli/executor/executor.go b/cli/executor/executor.go index 7ed542c5..8251dc28 100644 --- a/cli/executor/executor.go +++ b/cli/executor/executor.go @@ -16,7 +16,7 @@ import ( "syscall" "time" - "github.com/essentialkaos/ek/v13/errutil" + "github.com/essentialkaos/ek/v13/errors" "github.com/essentialkaos/ek/v13/fmtc" "github.com/essentialkaos/ek/v13/fmtutil/panel" "github.com/essentialkaos/ek/v13/fsutil" @@ -162,7 +162,7 @@ func NewExecutor(cfg *Config) *Executor { // Validate validates recipe func (e *Executor) Validate(r *recipe.Recipe, cfg *ValidationConfig) []error { - errs := errutil.NewErrors() + errs := errors.NewBundle() errs.Add(checkRecipeWorkingDir(r)) errs.Add(checkRecipeTags(r, cfg.Tags)) @@ -180,7 +180,7 @@ func (e *Executor) Validate(r *recipe.Recipe, cfg *ValidationConfig) []error { errs.Add(checkDependencies(r)) } - if !errs.HasErrors() { + if errs.IsEmpty() { return nil }