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") }