File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
package gxutil
2
2
3
3
import (
4
- "errors"
5
4
"io/ioutil"
6
5
"os"
7
6
"path/filepath"
8
7
"strings"
9
8
10
9
sh "github.com/ipfs/go-ipfs-api"
11
- hd "github.com/mitchellh/go-homedir"
12
10
manet "github.com/jbenet/go-multiaddr-net"
13
11
ma "github.com/jbenet/go-multiaddr-net/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
12
+ homedir "github.com/mitchellh/go-homedir"
14
13
log "github.com/whyrusleeping/stump"
15
14
)
16
15
@@ -32,9 +31,9 @@ func NewShell() *sh.Shell {
32
31
func getLocalApiShell () (* sh.Shell , error ) {
33
32
ipath := os .Getenv ("IPFS_PATH" )
34
33
if ipath == "" {
35
- home , err := hd .Dir ()
34
+ home , err := homedir .Dir ()
36
35
if err != nil {
37
- return nil , errors . New ( "neither IPFS_PATH nor home dir set" )
36
+ return nil , err
38
37
}
39
38
40
39
ipath = filepath .Join (home , ".ipfs" )
You can’t perform that action at this time.
0 commit comments