From 819ec4421530991aabbbdd546090fa8b4f134fe2 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Mon, 24 Oct 2016 18:24:35 -0600 Subject: [PATCH] fix(helm): skip overwriting the lock if it hasn't changed 'helm dep up' will only overwrite the lock file if the digest has changed (e.g. the source requirements.yaml is different). Closes #1438 --- cmd/helm/downloader/manager.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/helm/downloader/manager.go b/cmd/helm/downloader/manager.go index 7a1feafcd..731a9b3ea 100644 --- a/cmd/helm/downloader/manager.go +++ b/cmd/helm/downloader/manager.go @@ -138,6 +138,12 @@ func (m *Manager) Update() error { return err } + // If the lock file hasn't changed, don't write a new one. + oldLock, err := chartutil.LoadRequirementsLock(c) + if err == nil && oldLock.Digest == lock.Digest { + return nil + } + // Finally, we need to write the lockfile. return writeLock(m.ChartPath, lock) }