From 30803abe483ba9151f00b382391fe10f0950c66f Mon Sep 17 00:00:00 2001 From: geauxvirtual Date: Fri, 23 Oct 2015 11:33:39 -0700 Subject: [PATCH] Fix: Store the absolute path to the keyring file --- pulse.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pulse.go b/pulse.go index a243b294a..7e29ffd50 100644 --- a/pulse.go +++ b/pulse.go @@ -374,8 +374,18 @@ func action(ctx *cli.Context) { os.Exit(1) } file.Close() - log.Info("setting keyring file to: ", keyringFile) - c.SetKeyringFile(keyringFile) + p, err := filepath.Abs(keyringFile) + if err != nil { + log.WithFields( + log.Fields{ + "block": "main", + "_module": "pulsed", + "error": err.Error(), + }).Fatal("Unable to determine absolute path to keyring file") + os.Exit(1) + } + log.Info("setting keyring file to: ", p) + c.SetKeyringFile(p) } //Autodiscover