Skip to content

Commit

Permalink
Use the browser package
Browse files Browse the repository at this point in the history
  • Loading branch information
punmechanic committed Oct 4, 2023
1 parent 0869d42 commit 65558d6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
11 changes: 0 additions & 11 deletions cli/browser_darwin.go

This file was deleted.

11 changes: 0 additions & 11 deletions cli/browser_linux.go

This file was deleted.

3 changes: 2 additions & 1 deletion cli/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sts"
"github.com/pkg/browser"
"github.com/riotgames/key-conjurer/internal/api"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -302,7 +303,7 @@ func (p OktaTencentCloudSAMLProvider) FetchSAMLAssertion(ctx context.Context) ([

// TODO: We should probably wait a second before opening the browser to see if the http server is going to throw an error
// If it throws an error, we should bail
if err := OpenBrowser(p.Href); err != nil {
if err := browser.OpenURL(p.Href); err != nil {
return nil, fmt.Errorf("failed to open web browser to URL %s: %w", p.Href, err)
}

Expand Down

0 comments on commit 65558d6

Please sign in to comment.