From 262b9f986485eafd6bf6199abf8a3f59908e9306 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Tue, 10 Oct 2017 10:23:05 -0700 Subject: [PATCH] write cached charts to os.TempDir() --- pkg/downloader/manager.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 7c2ad6229..1e5ad7f35 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -206,7 +206,10 @@ func (m *Manager) downloadAll(deps []*chartutil.Dependency) error { } destPath := filepath.Join(m.ChartPath, "charts") - tmpPath := filepath.Join(m.ChartPath, "tmpcharts") + tmpPath, err := ioutil.TempDir("", "tmpcharts") + if err != nil { + return fmt.Errorf("Unable to create temp directory for writing old charts: %s", err) + } // Create 'charts' directory if it doesn't already exist. if fi, err := os.Stat(destPath); err != nil {