Skip to content

Commit

Permalink
fix issues in --reset-values and --reuse-values on helm v3 (#160)
Browse files Browse the repository at this point in the history
Correction of #159
  • Loading branch information
jonasrutishauser authored and mumoshu committed Oct 28, 2019
1 parent 8c96244 commit 99e1351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/helm3.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (d *diffCmd) template() ([]byte, error) {
// Helm automatically enable --reuse-values when there's no --set, --set-string, --set-values, --set-file present.
// Let's simulate that in helm-diff.
// See https://medium.com/@kcatstack/understand-helm-upgrade-flags-reset-values-reuse-values-6e58ac8f127e
shouldDefaultReusingValues := len(d.values) > 0 && len(d.stringValues) > 0 && len(d.valueFiles) > 0 && len(d.fileValues) > 0
shouldDefaultReusingValues := len(d.values) == 0 && len(d.stringValues) == 0 && len(d.valueFiles) == 0 && len(d.fileValues) == 0
if (d.reuseValues || shouldDefaultReusingValues) && !d.resetValues {
tmpfile, err := ioutil.TempFile("", "existing-values")
if err != nil {
Expand Down

0 comments on commit 99e1351

Please sign in to comment.