Skip to content

Commit

Permalink
Create directory automatically (argoproj-labs#680)
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Novick <[email protected]>
  • Loading branch information
jnovick authored and sribiere-jellysmack committed Aug 13, 2024
1 parent b61df67 commit 72c8684
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/argocd/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ func writeOverrides(app *v1alpha1.Application, wbc *WriteBackConfig, gitC git.Cl
}
}

dir := filepath.Dir(targetFile)
err = os.MkdirAll(dir, 0700)
if err != nil {
return
}

err = os.WriteFile(targetFile, override, 0600)
if err != nil {
return
Expand Down

0 comments on commit 72c8684

Please sign in to comment.