From 89cedd49b459e57b260a1063adfdf698da8d3003 Mon Sep 17 00:00:00 2001 From: Anuj Chaudhari Date: Wed, 20 Sep 2023 10:28:21 -0700 Subject: [PATCH] Address comments --- pkg/plugininventory/sqlite_inventory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/plugininventory/sqlite_inventory.go b/pkg/plugininventory/sqlite_inventory.go index 3e0978229..cd46038d4 100644 --- a/pkg/plugininventory/sqlite_inventory.go +++ b/pkg/plugininventory/sqlite_inventory.go @@ -226,7 +226,7 @@ func createPluginWhereClause(filter *PluginInventoryFilter) (string, error) { // e.g. If specified version is `v1` it matches with all versions like v1.MINOR.PATCH // If specified version is `v1.2` it matches will all versions like v1.2.PATCH // And "Version='%s'" condition will try to match with the exact same match for the version - whereClause = fmt.Sprintf("%s ( Version Like '%s.%%' OR Version='%s' ) AND", whereClause, filter.Version, filter.Version) + whereClause = fmt.Sprintf("%[1]s ( Version Like '%[2]s.%%' OR Version='%[2]s' ) AND", whereClause, filter.Version) } } if !filter.IncludeHidden {