Skip to content

Commit

Permalink
fix: kustomize write target issue (argoproj-labs#583)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Mavis <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
  • Loading branch information
dmavis authored and jwhy89 committed Aug 17, 2023
1 parent 1ff9268 commit f7a0f2c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pkg/argocd/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,18 +294,8 @@ var _ changeWriter = writeOverrides
// writeKustomization writes any changes required for updating one or more images to a kustomization.yml
func writeKustomization(app *v1alpha1.Application, wbc *WriteBackConfig, gitC git.Client) (err error, skip bool) {
logCtx := log.WithContext().AddField("application", app.GetName())
if oldDir, err := os.Getwd(); err != nil {
return err, false
} else {
defer func() {
_ = os.Chdir(oldDir)
}()
}

base := filepath.Join(gitC.Root(), wbc.KustomizeBase)
if err := os.Chdir(base); err != nil {
return err, false
}

logCtx.Infof("updating base %s", base)

Expand Down

0 comments on commit f7a0f2c

Please sign in to comment.