Skip to content

Commit

Permalink
Merge pull request #112 from lnguyen1401/OSD-7303
Browse files Browse the repository at this point in the history
fixed piping through jq functionality
  • Loading branch information
openshift-merge-robot authored Jun 24, 2021
2 parents 1a90f0d + 63d5052 commit 705df92
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/account/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func (o *cliOptions) complete(cmd *cobra.Command) error {
func (o *cliOptions) run() error {
awsClient, err := o.k8sclusterresourcefactory.GetCloudProvider(o.verbose)
if err != nil {

return err
}

Expand All @@ -98,7 +99,12 @@ func (o *cliOptions) run() error {
}

if o.output == "json" {
fmt.Fprintf(o.IOStreams.Out, "%s\n", creds)
fmt.Fprintf(o.IOStreams.Out, "{\n\"AccessKeyId\": %q, \n\"Expiration\": %q, \n\"SecretAccessKey\": %q, \n\"SessionToken\": %q\n}",
*creds.AccessKeyId,
*creds.Expiration,
*creds.SecretAccessKey,
*creds.SessionToken,
)
}

if o.output == "env" {
Expand Down

0 comments on commit 705df92

Please sign in to comment.