Skip to content

Commit

Permalink
Strip trailing whitespace in token from file.
Browse files Browse the repository at this point in the history
Fixes #1774
  • Loading branch information
jefferai committed Aug 24, 2016
1 parent d57fe39 commit f8c657a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion command/token/helper_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io"
"os"
"strings"

"github.com/mitchellh/go-homedir"
)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f8c657a

Please sign in to comment.