Skip to content

Commit

Permalink
chore(entities): fix check for entity tags in search flag validation
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderblue committed Apr 11, 2024
1 parent f17f5a9 commit 8646308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/entities/command_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The search command performs a search for New Relic entities.
Example: "newrelic entity search --name=<name> --type=<type> --domain=<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")
}
Expand Down

0 comments on commit 8646308

Please sign in to comment.