mirror of
https://github.com/Luzifer/vault2env.git
synced 2024-12-20 20:21:20 +00:00
Fix: Don't panic if a key is not existent
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
2223b78d64
commit
2d64463bfb
1 changed files with 5 additions and 0 deletions
5
main.go
5
main.go
|
@ -118,6 +118,11 @@ func main() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if data == nil {
|
||||||
|
log.Errorf("Vault key %q does not exist", vaultKey)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if data.Data == nil {
|
if data.Data == nil {
|
||||||
log.Errorf("Vault key %q did not contain data", vaultKey)
|
log.Errorf("Vault key %q did not contain data", vaultKey)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue