dagger list: skip environment if it can't be decryted
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
0acd3a256a
commit
155c90e3e0
@ -9,6 +9,7 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"dagger.io/go/dagger/keychain"
|
||||
"github.com/rs/zerolog/log"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
@ -109,7 +110,12 @@ func (w *Workspace) List(ctx context.Context) ([]*State, error) {
|
||||
}
|
||||
st, err := w.Get(ctx, f.Name())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
log.
|
||||
Ctx(ctx).
|
||||
Err(err).
|
||||
Str("name", f.Name()).
|
||||
Msg("failed to load environment")
|
||||
continue
|
||||
}
|
||||
environments = append(environments, st)
|
||||
}
|
||||
|
Reference in New Issue
Block a user