deps: replace multierr with native errors.Join

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-02-07 12:56:25 +01:00
parent 955316c661
commit 12c866bcb9
32 changed files with 173 additions and 159 deletions

View file

@ -8,6 +8,7 @@ package cmd
import (
"context"
"errors"
"fmt"
"io"
"net"
@ -80,9 +81,14 @@ func (r *recoverCmd) recover(
r.log.Debugf("Loading configuration file from %q", flags.configPath)
conf, err := config.New(fileHandler, flags.configPath, flags.force)
if err != nil {
return config.DisplayValidationErrors(cmd.ErrOrStderr(), err)
var configValidationErr *config.ValidationError
if errors.As(err, &configValidationErr) {
cmd.PrintErrln(configValidationErr.LongMessage())
}
if err != nil {
return err
}
provider := conf.GetProvider()
r.log.Debugf("Got provider %s", provider.String())
if provider == cloudprovider.Azure {