Skip to content

Commit bb6280d

Browse files
authored
Create directory automatically (#680)
Signed-off-by: Joshua Novick <joshua.novick@hunters.ai>
1 parent 89f3bd1 commit bb6280d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/argocd/git.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ func writeOverrides(app *v1alpha1.Application, wbc *WriteBackConfig, gitC git.Cl
291291
}
292292
}
293293

294+
dir := filepath.Dir(targetFile)
295+
err = os.MkdirAll(dir, 0700)
296+
if err != nil {
297+
return
298+
}
299+
294300
err = os.WriteFile(targetFile, override, 0600)
295301
if err != nil {
296302
return

0 commit comments

Comments
 (0)