Skip to content

Commit

Permalink
fix homedir expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense committed Feb 28, 2023
1 parent 191fdd2 commit c4e9f46
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/boost/retrieve_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
flatfs "github.com/ipfs/go-ds-flatfs"
levelds "github.com/ipfs/go-ds-leveldb"
blockstore "github.com/ipfs/go-ipfs-blockstore"
"github.com/mitchellh/go-homedir"

"github.com/dustin/go-humanize"
clinode "github.com/filecoin-project/boost/cli/node"
Expand Down Expand Up @@ -85,6 +86,12 @@ var retrieveCmd = &cli.Command{
}

cfgdir := cctx.String(cmd.FlagRepo.Name)

cfgdir, err = homedir.Expand(cfgdir)
if err != nil {
return fmt.Errorf("expanding homedir: %w", err)
}

node, err := clinode.Setup(cfgdir)
if err != nil {
return fmt.Errorf("setting up CLI node: %w", err)
Expand Down

0 comments on commit c4e9f46

Please sign in to comment.