Skip to content

Commit

Permalink
Use debug logging (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaWilkes authored Mar 17, 2022
1 parent ebe2510 commit 7fd0c85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cfaws/assumer_aws_sso.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
ssooidctypes "github.com/aws/aws-sdk-go-v2/service/ssooidc/types"
"github.com/aws/aws-sdk-go-v2/service/sts"
"github.com/bigkevmcd/go-configparser"
"github.com/common-fate/granted/pkg/debug"
"github.com/fatih/color"
"github.com/pkg/browser"
"github.com/pkg/errors"
Expand Down Expand Up @@ -148,7 +149,8 @@ func SSODeviceCodeFlow(ctx context.Context, cfg aws.Config, rootProfile *CFShare
fmt.Fprintf(color.Error, "If browser is not opened automatically, please open link:\n%v\n", url)
err = browser.OpenURL(url)
if err != nil {
return nil, err
// fail silently
debug.Fprintf(debug.VerbosityDebug, color.Error, err.Error())
}

fmt.Fprintln(color.Error, "\nAwaiting authentication in the browser...")
Expand Down

0 comments on commit 7fd0c85

Please sign in to comment.