about summary refs log tree commit diff
path: root/templater/pass.go
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2017-02-20T13·25+0100
committerVincent Ambo <tazjin@gmail.com>2017-02-20T13·25+0100
commit0b992c6156a3beba093ff41030783a68f52377ef (patch)
tree29e6136563a8e2667bab218a988b6f026960b699 /templater/pass.go
parent0147c3e13e741f1d2bac7f082e509222fb86ab38 (diff)
fix pass: Trim leading & trailing whitespace
Diffstat (limited to 'templater/pass.go')
-rw-r--r--templater/pass.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/templater/pass.go b/templater/pass.go
index f1dc82986174..fbd2c076412b 100644
--- a/templater/pass.go
+++ b/templater/pass.go
@@ -8,6 +8,7 @@ import (
 	"os/exec"
 
 	"github.com/polydawn/meep"
+	"strings"
 )
 
 type PassError struct {
@@ -28,5 +29,7 @@ func GetFromPass(key string) (string, error) {
 		)
 	}
 
-	return string(output), nil
+	trimmed := strings.TrimSpace(string(output))
+
+	return trimmed, nil
 }