mirror of
https://github.com/MedzikUser/go-github-selfupdate.git
synced 2024-08-15 03:25:29 +00:00
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:
parent
ef42c4e258
commit
41acec25c4
1 changed files with 0 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue