Strip trailing whitespace in token from file.

Fixes #1774
This commit is contained in:
Jeff Mitchell 2016-08-23 20:22:45 -04:00
parent 66d3117cad
commit 1ee4cb4725
1 changed files with 2 additions and 1 deletions

View File

@ -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