Skip to content

Commit

Permalink
fix: Also write metrics in case of no error
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenschneider committed Dec 31, 2021
1 parent f92c102 commit c6b28fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ func main() {
}

err = pickUpCerts(client, conf)
if err != nil {
die("error while picking up and storing certificates: %v", err, conf)
}
die("error while picking up and storing certificates: %v", err, conf)
}

func die(msg string, err error, conf config.AcmeVaultClientConfig) {
writeMetrics(conf)
log.Fatal().Msgf(msg, err)
if err != nil {
log.Fatal().Msgf(msg, err)
}
}

func pickUpCerts(client *client.VaultAcmeClient, conf config.AcmeVaultClientConfig) error {
Expand Down

0 comments on commit c6b28fb

Please sign in to comment.