Skip to content

Commit

Permalink
Fix "Current not implemented on freebsd/amd64" error (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
themartorana authored and maruel committed Mar 1, 2018
1 parent eaf2844 commit af628dd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions stack/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -884,11 +884,17 @@ func getGOPATHs() []string {
}
}
if len(out) == 0 {
homeDir := ""
u, err := user.Current()
if err != nil {
panic(err)
homeDir = os.Getenv("HOME")
if homeDir == "" {
panic(fmt.Sprintf("Could not get current user or $HOME: %s\n", err.Error()))
}
} else {
homeDir = u.HomeDir
}
out = []string{u.HomeDir + "go"}
out = []string{homeDir + "go"}
}
return out
}
Expand Down

0 comments on commit af628dd

Please sign in to comment.