mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-09 03:01:16 +00:00
fix: ensure parent directories are created in EnsureDirExists function (#293)
This commit is contained in:
@@ -164,7 +164,7 @@ func FileExists(path string) (bool, error) {
|
||||
}
|
||||
|
||||
func EnsureDirExists(dir string) error {
|
||||
err := os.Mkdir(dir, 0755)
|
||||
err := os.MkdirAll(dir, 0755)
|
||||
|
||||
if errors.Is(err, os.ErrExist) {
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user