Skip to content

Commit

Permalink
Merge pull request #106 from ipfs/fix/resolve-homedir
Browse files Browse the repository at this point in the history
resolve homedir
  • Loading branch information
aschmahmann authored Dec 8, 2020
2 parents a281eca + 7f295d3 commit c3f148e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ var migrations = []gomigrate.Migration{
func GetIpfsDir() (string, error) {
ipfspath := os.Getenv("IPFS_PATH")
if ipfspath != "" {
return ipfspath, nil
expandedPath, err := homedir.Expand(ipfspath)
if err != nil {
return "", err
}
return expandedPath, nil
}

home, err := homedir.Dir()
Expand Down

0 comments on commit c3f148e

Please sign in to comment.