Skip to content

Commit f9f5d2f

Browse files
committed
add missing continue to skip deleting a variable that doesn't exist
1 parent 081ebcc commit f9f5d2f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/cli/multiregion/setup.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func runSetup() {
3636
deleteUnusedVariables(pFlags)
3737
setSensitiveVariables(pFlags)
3838

39-
answer := simplePrompt(`Set remote consumers? Type "yes" if workspace-specific sharing is used.`)
39+
answer := simplePrompt(`\nSet remote consumers? Type "yes" if workspace-specific sharing is used.`)
4040
if answer == "yes" {
4141
if err := setRemoteConsumers(pFlags); err != nil {
4242
log.Fatalf("Error: " + err.Error())
@@ -282,7 +282,9 @@ func deleteVariablesFromWorkspace(pFlags PersistentFlags, workspace string, keys
282282
v := findVar(currentVars, k)
283283
if v == nil {
284284
fmt.Printf("variable %s in workspace %s has already been deleted\n", k, workspace)
285+
continue
285286
}
287+
fmt.Printf("deleting %s in workspace %s\n", k, workspace)
286288
lib.DeleteVariable(v.ID)
287289
}
288290
}

0 commit comments

Comments
 (0)