Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion actions/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package actions
import (
"github.com/bitcomplete/plz-cli/client/auth"
"github.com/bitcomplete/plz-cli/client/deps"
"github.com/pkg/errors"
"github.com/urfave/cli/v2"
)

func Auth(c *cli.Context) error {
deps := deps.FromContext(c.Context)
auth, err := auth.Prompt(deps.PlzAPIBaseURL)
if err != nil {
return err
return errors.WithStack(err)
}
return auth.SaveToKeyRing()
}
2 changes: 1 addition & 1 deletion auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func Prompt(plzAPIBaseURL string) (*Auth, error) {
httpClient := http.DefaultClient
gitHubAppClientID, err := fetchGitHubAppClientID(httpClient, plzAPIBaseURL)
if err != nil {
return nil, err
return nil, errors.WithStack(err)
}
code, err := device.RequestCode(
httpClient,
Expand Down