Skip to content

Commit

Permalink
Hotfix/ipfsaddr vars (#275)
Browse files Browse the repository at this point in the history
* Hotfix: use string for main var and add to makefile

* Hotfix: add ipfs_addr to CI vars.

* Hotfix: prefix ipfs path with homedir so we don't to pass ~ into CI.
  • Loading branch information
jsonsivar authored Dec 3, 2020
1 parent f71e499 commit a187b50
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/ipfs/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"github.com/FleekHQ/space-daemon/config"
"github.com/FleekHQ/space-daemon/log"

"os/user"

"fmt"
"io/ioutil"
"path/filepath"
Expand Down Expand Up @@ -85,6 +87,13 @@ func (node *IpfsNode) start() error {
repoPath := node.cfg.GetString(config.Ipfsnodepath, pathRoot)
if repoPath == "" {
repoPath = pathRoot
} else {
usr, err := user.Current()
if err != nil {
repoPath = pathRoot
} else {
repoPath = filepath.Join(usr.HomeDir, repoPath)
}
}

if err := setupPlugins(repoPath); err != nil {
Expand Down

0 comments on commit a187b50

Please sign in to comment.