mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-12-28 15:24:59 +08:00
test
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
This commit is contained in:
parent
b0e9f7cc99
commit
535d345446
1 changed files with 3 additions and 3 deletions
|
|
@ -242,8 +242,8 @@ func recurseSecretKey(format FormatType, keys map[string]interface{}, wantedKey
|
|||
if !ok {
|
||||
return "", fmt.Errorf("the key '%s' cannot be found", keyUntilNow)
|
||||
}
|
||||
var valWithWrongType map[interface{}]interface{}
|
||||
valWithWrongType, ok = val.(map[interface{}]interface{})
|
||||
var valWithWrongType map[string]interface{}
|
||||
valWithWrongType, ok = val.(map[string]interface{})
|
||||
if !ok {
|
||||
return "", fmt.Errorf("key '%s' does not refer to a dictionary", keyUntilNow)
|
||||
}
|
||||
|
|
@ -474,7 +474,7 @@ func (app *appContext) validateSopsFile(s *secret, file *secretFile) error {
|
|||
if app.checkMode != Manifest && (s.Format != Binary && s.Format != Dotenv && s.Format != Ini) {
|
||||
_, err := recurseSecretKey(s.Format, file.keys, s.Key)
|
||||
if err != nil {
|
||||
return fmt.Errorf("secret %s in %s is not valid: %w (format: %s)", s.Name, s.SopsFile, err, s.Format)
|
||||
return fmt.Errorf("secret %s in %s is not valid: %w", s.Name, s.SopsFile, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue