undo overzealous find/replace
This commit is contained in:
parent
56522f9f14
commit
0a619d422a
18 changed files with 39 additions and 32 deletions
|
|
@ -14,7 +14,7 @@ import (
|
|||
const tokenUser = "x-access-token"
|
||||
|
||||
type config interface {
|
||||
GetOrDefaultWithSource(string, string) (string, string, error)
|
||||
GetWithSource(string, string) (string, string, error)
|
||||
}
|
||||
|
||||
type CredentialOptions struct {
|
||||
|
|
@ -101,11 +101,11 @@ func helperRun(opts *CredentialOptions) error {
|
|||
}
|
||||
|
||||
var gotUser string
|
||||
gotToken, source, _ := cfg.GetOrDefaultWithSource(wants["host"], "oauth_token")
|
||||
gotToken, source, _ := cfg.GetWithSource(wants["host"], "oauth_token")
|
||||
if strings.HasSuffix(source, "_TOKEN") {
|
||||
gotUser = tokenUser
|
||||
} else {
|
||||
gotUser, _, _ = cfg.GetOrDefaultWithSource(wants["host"], "user")
|
||||
gotUser, _, _ = cfg.GetWithSource(wants["host"], "user")
|
||||
}
|
||||
|
||||
if gotUser == "" || gotToken == "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue