Skip to content

Commit e62ac4a

Browse files
dmavisxescab
authored andcommitted
fix: kustomize write target issue (argoproj-labs#583)
Signed-off-by: Daniel Mavis <[email protected]> Signed-off-by: Francesc Arbona <[email protected]>
1 parent fce6307 commit e62ac4a

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

pkg/argocd/git.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -294,18 +294,8 @@ var _ changeWriter = writeOverrides
294294
// writeKustomization writes any changes required for updating one or more images to a kustomization.yml
295295
func writeKustomization(app *v1alpha1.Application, wbc *WriteBackConfig, gitC git.Client) (err error, skip bool) {
296296
logCtx := log.WithContext().AddField("application", app.GetName())
297-
if oldDir, err := os.Getwd(); err != nil {
298-
return err, false
299-
} else {
300-
defer func() {
301-
_ = os.Chdir(oldDir)
302-
}()
303-
}
304297

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

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

0 commit comments

Comments
 (0)