Do not require GITHUB_TOKEN for enterprise setups

Not sure why this was added but using no token works for our GitHub enterprise installation.
This commit is contained in:
Fabian Ruff 2018-04-27 16:57:14 +02:00
parent ef42c4e258
commit 41acec25c4

View file

@ -2,7 +2,6 @@ package selfupdate
import ( import (
"context" "context"
"errors"
"net/http" "net/http"
"os" "os"
@ -56,9 +55,6 @@ func NewUpdater(config Config) (*Updater, error) {
return &Updater{client, ctx}, nil return &Updater{client, ctx}, nil
} }
if token == "" {
return nil, errors.New("GitHub API token cannot be empty when releases are hosted on GitHub Enterprise instance")
}
u := config.EnterpriseUploadURL u := config.EnterpriseUploadURL
if u == "" { if u == "" {
u = config.EnterpriseBaseURL u = config.EnterpriseBaseURL