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

@ -187,8 +187,12 @@ func (m *miniUpCmd) prepareConfig(cmd *cobra.Command, fileHandler file.Handler)
// check for existing config
if configPath != "" {
conf, err := config.New(fileHandler, configPath, force)
var configValidationErr *config.ValidationError
if errors.As(err, &configValidationErr) {
cmd.PrintErrln(configValidationErr.LongMessage())
}
if err != nil {
return nil, config.DisplayValidationErrors(cmd.ErrOrStderr(), err)
return nil, err
}
if conf.GetProvider() != cloudprovider.QEMU {
return nil, errors.New("invalid provider for MiniConstellation cluster")