From 0b942f44933c3c84ed8e75066443835344595093 Mon Sep 17 00:00:00 2001 From: Todd Date: Thu, 8 Sep 2022 11:15:03 -0700 Subject: [PATCH] Only clear tags in set-worker-tags when "null" is set as the value of the -tag flag. (#2434) --- internal/cmd/commands/workerscmd/funcs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/commands/workerscmd/funcs.go b/internal/cmd/commands/workerscmd/funcs.go index 2fb5a3646..b803f131b 100644 --- a/internal/cmd/commands/workerscmd/funcs.go +++ b/internal/cmd/commands/workerscmd/funcs.go @@ -130,7 +130,7 @@ func extraFlagsHandlingFuncImpl(c *Command, _ *base.FlagSets, opts *[]workers.Op c.UI.Error("No tags supplied via -tag") return false case 1: - if c.FlagTags["null"] == nil { + if v, found := c.FlagTags["null"]; found && v == nil { c.FlagTags = nil } }