Skip to content

Commit 1875031

Browse files
committed
fix: allow updating values quickly with --set flag
1 parent 5260a1b commit 1875031

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/cli/upgrade.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ func runUpgrade(cmd *cobra.Command, opts upgradeOptions) error {
146146
}
147147

148148
} else {
149-
opts.ReuseOldValues = false
150149
cmd.Printf(
151150
"Modifying values for sauce with recipe '%s' version %s\n",
152151
oldSauce.Recipe.Name,
@@ -210,6 +209,12 @@ func runUpgrade(cmd *cobra.Command, opts upgradeOptions) error {
210209

211210
values = recipeutil.MergeValues(reusedValues, providedValues)
212211

212+
// If the user is updating values for a recipe and hasn't provided any values,
213+
// assume that all values needs to be prompted
214+
if versionComparison == 0 && len(providedValues) == 0 {
215+
opts.ReuseOldValues = false
216+
}
217+
213218
if opts.ReuseOldValues {
214219
validatedValues, errs := recipeutil.CleanValues(re.Variables, oldSauce.Values)
215220
if len(errs) != 0 {

0 commit comments

Comments
 (0)