From 8646308a59666fe3b82b4593e1b52f843f3e5b68 Mon Sep 17 00:00:00 2001 From: Sander Blue Date: Wed, 3 Apr 2024 15:27:20 -0500 Subject: [PATCH] chore(entities): fix check for entity tags in search flag validation --- internal/entities/command_search.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/entities/command_search.go b/internal/entities/command_search.go index 1d49a22a3..673cb0d8c 100644 --- a/internal/entities/command_search.go +++ b/internal/entities/command_search.go @@ -26,7 +26,7 @@ The search command performs a search for New Relic entities. Example: "newrelic entity search --name= --type= --domain= --tags=tagKey1:tagValue2,tagKey2:tagValue2", PreRun: client.RequireClient, Run: func(cmd *cobra.Command, args []string) { - if entityName == "" && entityType == "" && entityAlertSeverity == "" && entityDomain == "" && entityTags == nil { + if entityName == "" && entityType == "" && entityAlertSeverity == "" && entityDomain == "" && len(entityTags) == 0 { utils.LogIfError(cmd.Help()) log.Fatal("one of --name, --type, --alert-severity, --domain, or --tags is required") }