Skip to content

Commit

Permalink
fix no such dir if not create goctl home (#4177)
Browse files Browse the repository at this point in the history
  • Loading branch information
kesonan committed Jun 4, 2024
1 parent 424119d commit 23980d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/goctl/util/pathx/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ func GetDefaultGoctlHome() (string, error) {
if err != nil {
return "", err
}
return filepath.Join(home, goctlDir), nil
goctlHomeDir := filepath.Join(home, goctlDir)
_ = MkdirIfNotExist(goctlHomeDir)
return goctlHomeDir, nil
}

// GetGitHome returns the git home of goctl.
Expand Down

0 comments on commit 23980d2

Please sign in to comment.