Skip to content

Commit

Permalink
Fixed a nil panic issue in vault provider (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangkang committed Aug 14, 2023
1 parent 860346f commit 84435fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions providers/vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ func (r *Vault) Read() (map[string]interface{}, error) {
return nil, err
}

if secret == nil {
return nil, errors.New("vault provider fetched no data")
}

s := secret.Data
if r.cfg.ExcludeMeta {
s = secret.Data["data"].(map[string]interface{})
Expand Down

0 comments on commit 84435fe

Please sign in to comment.