worker: Trim offline token

This commit is contained in:
sanne 2021-06-22 10:35:59 +02:00 committed by Ondřej Budai
parent 9161553170
commit acf88309c2

View file

@ -11,6 +11,7 @@ import (
"log"
"os"
"path"
"strings"
"time"
"github.com/BurntSushi/toml"
@ -152,7 +153,7 @@ func main() {
if err != nil {
log.Fatalf("Could not read offline token: %v", err)
}
token := string(t)
token := strings.TrimSpace(string(t))
if config.Authentication.OAuthURL == "" {
log.Fatal("OAuth URL should be specified together with the offline token")