Skip to content

Commit

Permalink
feat: check homeDir maybe empty
Browse files Browse the repository at this point in the history
  • Loading branch information
juev committed Dec 9, 2023
1 parent 400b4a6 commit 95e7c08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/gobrew/main.go
Expand Up @@ -75,7 +75,7 @@ func init() {

func main() {
homeDir, ok := os.LookupEnv("GOBREW_ROOT")
if !ok {
if !ok || homeDir == "" {
var err error
homeDir, err = os.UserHomeDir()
utils.CheckError(err, "failed get home directory and GOBREW_ROOT not defined")
Expand Down

0 comments on commit 95e7c08

Please sign in to comment.