Skip to content

Commit 8d0f81e

Browse files
committed
print oidc-agent error if something goes wrong
1 parent 25e24b5 commit 8d0f81e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

orchent.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"gopkg.in/alecthomas/kingpin.v2"
2020
)
2121

22-
const OrchentVersion string = "1.2.4"
22+
const OrchentVersion string = "1.2.5"
2323

2424
var (
2525
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)
@@ -605,6 +605,7 @@ func try_agent_token(account string) (tokenSet bool, tokenValue string) {
605605
token, err := liboidcagent.GetAccessToken(account, 120, "", "wattson")
606606
if err != nil {
607607
fmt.Println("*** ERROR: Could not get token from oidc-agent and $ORCHENT_TOKEN not set ***")
608+
fmt.Printf("agent error: %s\n", err)
608609
return false, tokenValue
609610
}
610611
return true, token

0 commit comments

Comments
 (0)