From adeb4ca3d974936349f1980db3ac5599bac8611e Mon Sep 17 00:00:00 2001 From: Suleiman Dibirov Date: Sun, 16 Jun 2024 16:52:05 +0300 Subject: [PATCH] fix(dependencyBuild): prevent race condition in concurrent helm dependency Signed-off-by: Suleiman Dibirov --- pkg/downloader/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 68c9c6e00..d5340575d 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -246,7 +246,7 @@ func (m *Manager) downloadAll(deps []*chart.Dependency) error { } destPath := filepath.Join(m.ChartPath, "charts") - tmpPath := filepath.Join(m.ChartPath, "tmpcharts") + tmpPath := filepath.Join(m.ChartPath, fmt.Sprintf("tmpcharts-%d", os.Getpid())) // Check if 'charts' directory is not actually a directory. If it does not exist, create it. if fi, err := os.Stat(destPath); err == nil {