Skip to content

Commit

Permalink
Merge pull request #58 from itz-Jana/token-trim-whitespace
Browse files Browse the repository at this point in the history
Trim whitespaces from access token
  • Loading branch information
nlewo authored Nov 13, 2024
2 parents 84ef9af + 4d55950 commit 9afca85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"gopkg.in/yaml.v2"
"os"
"path/filepath"
"strings"
)

func Read(path string) (config types.Configuration, err error) {
Expand All @@ -25,7 +26,7 @@ func Read(path string) (config types.Configuration, err error) {
if err != nil {
return config, err
}
config.Remotes[i].Auth.AccessToken = string(content)
config.Remotes[i].Auth.AccessToken = strings.TrimSpace(string(content))
}
if remote.Timeout == 0 {
config.Remotes[i].Timeout = 300
Expand Down

0 comments on commit 9afca85

Please sign in to comment.