From 8d0f81e4c409b30a54de26eae55c7041e97a62cd Mon Sep 17 00:00:00 2001 From: zachmann Date: Tue, 16 Apr 2019 10:38:12 +0200 Subject: [PATCH] print oidc-agent error if something goes wrong --- orchent.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/orchent.go b/orchent.go index 9130c53..71dbc6b 100644 --- a/orchent.go +++ b/orchent.go @@ -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= \n OR \n export OIDC_SOCK= (usually this is already exported) \n export ORCHENT_AGENT_ACCOUNT= \nIf you need to specify the file containing the trusted root CAs use the 'ORCHENT_CAFILE' environment variable: \n export ORCHENT_CAFILE=\n \n").Version(OrchentVersion) @@ -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