Skip to content

Commit

Permalink
Check for wrapping error
Browse files Browse the repository at this point in the history
  • Loading branch information
Shannon Wynter authored and Shannon Wynter committed Mar 1, 2017
1 parent 0cddb30 commit 2306612
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"io/ioutil"
"os"
"os/exec"
"strings"
"time"

log "github.com/Sirupsen/logrus"
Expand Down Expand Up @@ -125,7 +126,9 @@ func main() {

secret, err := vault.Logical().Unwrap(token)
if err != nil {
log.WithError(err).Fatal("Unwrapping secret failed")
if !strings.HasSuffix(err.Error(), "* wrapping token is not valid or does not exist") {
log.WithError(err).Fatal("Unwrapping secret failed")
}
}

if secret != nil {
Expand Down

0 comments on commit 2306612

Please sign in to comment.