Skip to content

Commit

Permalink
Merge pull request #159 from filecoin-project/fix/cli
Browse files Browse the repository at this point in the history
fix: cli not found config
  • Loading branch information
LinZexiao authored Mar 15, 2023
2 parents 3575c6c + 6852530 commit 7feca83
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cli/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ import (
"fmt"

"github.com/filecoin-project/venus-auth/jwtclient"
"github.com/mitchellh/go-homedir"
"github.com/urfave/cli/v2"
)

// nolint
func GetCli(ctx *cli.Context) (*jwtclient.AuthClient, error) {
repo, err := NewFsRepo(ctx.String("repo"))
repoPath, err := homedir.Expand(ctx.String("repo"))
if err != nil {
return nil, err
}

repo, err := NewFsRepo(repoPath)
if err != nil {
return nil, fmt.Errorf("create repo: %w", err)
}
Expand Down

0 comments on commit 7feca83

Please sign in to comment.