From f8c657a80a6b8e6dc5baa06febe0b67f00ced96e Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 23 Aug 2016 20:22:45 -0400 Subject: [PATCH] Strip trailing whitespace in token from file. Fixes #1774 --- command/token/helper_internal.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/token/helper_internal.go b/command/token/helper_internal.go index 4327be4194..89793cb63d 100644 --- a/command/token/helper_internal.go +++ b/command/token/helper_internal.go @@ -5,6 +5,7 @@ import ( "fmt" "io" "os" + "strings" "github.com/mitchellh/go-homedir" ) @@ -46,7 +47,7 @@ func (i *InternalTokenHelper) Get() (string, error) { return "", err } - return buf.String(), nil + return strings.TrimSpace(buf.String()), nil } // Store stores the value of the token to the file