Skip to content

Commit

Permalink
print oidc-agent error if something goes wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
zachmann committed Apr 16, 2019
1 parent 25e24b5 commit 8d0f81e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion orchent.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"gopkg.in/alecthomas/kingpin.v2"
)

const OrchentVersion string = "1.2.4"
const OrchentVersion string = "1.2.5"

var (
app = kingpin.New("orchent", "The orchestrator client. \n \nPlease either store your access token in 'ORCHENT_TOKEN' or set the account to use with oidc-agent in the 'ORCHENT_AGENT_ACCOUNT' and the socket of the oidc-agent in the 'OIDC_SOCK' environment variable: \n export ORCHENT_TOKEN=<your access token> \n OR \n export OIDC_SOCK=<path to the oidc-agent socket> (usually this is already exported) \n export ORCHENT_AGENT_ACCOUNT=<account to use> \nIf you need to specify the file containing the trusted root CAs use the 'ORCHENT_CAFILE' environment variable: \n export ORCHENT_CAFILE=<path to file containing trusted CAs>\n \n").Version(OrchentVersion)
Expand Down Expand Up @@ -605,6 +605,7 @@ func try_agent_token(account string) (tokenSet bool, tokenValue string) {
token, err := liboidcagent.GetAccessToken(account, 120, "", "wattson")
if err != nil {
fmt.Println("*** ERROR: Could not get token from oidc-agent and $ORCHENT_TOKEN not set ***")
fmt.Printf("agent error: %s\n", err)
return false, tokenValue
}
return true, token
Expand Down

0 comments on commit 8d0f81e

Please sign in to comment.