Skip to content

Commit f89a572

Browse files
dmavisks-yim
authored andcommitted
fix: kustomize write target issue (#583)
Signed-off-by: Daniel Mavis <[email protected]> Signed-off-by: KS. Yim <[email protected]>
1 parent d46e5a6 commit f89a572

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
@@ -300,18 +300,8 @@ var _ changeWriter = writeOverrides
300300
// writeKustomization writes any changes required for updating one or more images to a kustomization.yml
301301
func writeKustomization(app *v1alpha1.Application, wbc *WriteBackConfig, gitC git.Client) (err error, skip bool) {
302302
logCtx := log.WithContext().AddField("application", app.GetName())
303-
if oldDir, err := os.Getwd(); err != nil {
304-
return err, false
305-
} else {
306-
defer func() {
307-
_ = os.Chdir(oldDir)
308-
}()
309-
}
310303

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

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

0 commit comments

Comments
 (0)