remove tmp path in case it exists

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
pull/9782/head
Josh Dolitsky 4 years ago
parent e5b03c73f0
commit 4ed8e77026
No known key found for this signature in database
GPG Key ID: B2B93673243A65FB

@ -258,6 +258,9 @@ func (m *Manager) downloadAll(deps []*chart.Dependency) error {
return errors.Errorf("%q is not a directory", destPath)
}
if err := os.RemoveAll(tmpPath); err != nil {
return errors.Wrapf(err, "failed to remove %v", tmpPath)
}
if err := fs.RenameWithFallback(destPath, tmpPath); err != nil {
return errors.Wrap(err, "unable to move current charts to tmp dir")
}

Loading…
Cancel
Save