fix no such dir if not create goctl home (#4177)

This commit is contained in:
kesonan 2024-06-04 18:55:56 +08:00 committed by GitHub
parent 424119d796
commit 23980d29c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.