Merge pull request #534 from grouville/dagger_list_private_key
Dagger List cmd : change error message to a more comprehensible one when privatekey not present
This commit is contained in:
commit
795c34a300
@ -131,6 +131,9 @@ func Decrypt(_ context.Context, encrypted []byte) ([]byte, error) {
|
||||
}
|
||||
key, err := tree.Metadata.GetDataKey()
|
||||
if err != nil {
|
||||
if userErr, ok := err.(sops.UserError); ok {
|
||||
err = fmt.Errorf(userErr.UserError())
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user