Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Calvin <[email protected]>
  • Loading branch information
JoshuaWilkes and ckluy31 authored Nov 11, 2024
1 parent f04c873 commit ac89c7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/granted/registry/cfregistry/cfregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ func (r *Registry) getClient(interactive bool) (awsv1alpha1connect.ProfileRegist
// the OAuth2.0 token is expired so we should prompt the user to log in
if needsToRefreshLogin(err) {
if interactive {
clio.Infof("You need to log in to Common Fate to sync your profile registry")
clio.Infof("You need to log into Common Fate to sync your profile registry")
lf := loginflow.NewFromConfig(cfg)
err = lf.Login(context.Background())
if err != nil {
return nil, err
}
} else {
// in non interactive mode, just return a wrapped error
return nil, fmt.Errorf("you need to log in to Common Fate to sync your profile registry using `granted auth login`: %w", err)
return nil, fmt.Errorf("you need to log into Common Fate to sync your profile registry using `granted auth login`: %w", err)
}

} else {
Expand Down

0 comments on commit ac89c7f

Please sign in to comment.