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
parent a34472d1
...@@ -138,6 +138,12 @@ func (m *Manager) Update() error { ...@@ -138,6 +138,12 @@ func (m *Manager) Update() error {
return err 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. // Finally, we need to write the lockfile.
return writeLock(m.ChartPath, lock) return writeLock(m.ChartPath, lock)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment