(fix) non-existent custom temp dir

Signed-off-by: Quan TRAN <account@itscaro.me>
This commit is contained in:
Quan TRAN 2022-04-12 22:27:59 +02:00
parent c7b23a67cb
commit 12e103d510
1 changed files with 5 additions and 3 deletions

View File

@ -34,9 +34,11 @@ func tempValuesFilePath(release *ReleaseSpec, data interface{}) (*string, error)
workDir := os.Getenv("HELMFILE_TEMPDIR")
if workDir == "" {
workDir, err = os.MkdirTemp(os.TempDir(), "helmfile")
if err != nil {
panic(err)
}
} else {
err = os.MkdirAll(workDir, os.FileMode(0700))
}
if err != nil {
panic(err)
}
d := filepath.Join(workDir, id)