From 73d568c531aa9f3c1bf286047a64a46e495287ee Mon Sep 17 00:00:00 2001 From: Binaek Sarkar Date: Tue, 30 Nov 2021 18:07:53 +0530 Subject: [PATCH] Fixes issue where `local` plugins are not evaluated as `local` as given in docs. Closes #1176 --- steampipeconfig/parse/connection.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/steampipeconfig/parse/connection.go b/steampipeconfig/parse/connection.go index bda205d4f6..862be6c34d 100644 --- a/steampipeconfig/parse/connection.go +++ b/steampipeconfig/parse/connection.go @@ -3,6 +3,7 @@ package parse import ( "fmt" "sort" + "strings" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/gohcl" @@ -26,7 +27,12 @@ func DecodeConnection(block *hcl.Block) (*modconfig.Connection, hcl.Diagnostics) if diags.HasErrors() { return nil, diags } - connection.Plugin = ociinstaller.NewSteampipeImageRef(pluginName).DisplayImageRef() + + if strings.HasPrefix(pluginName, "local/") { + connection.Plugin = pluginName + } else { + connection.Plugin = ociinstaller.NewSteampipeImageRef(pluginName).DisplayImageRef() + } connection.PluginShortName = pluginName if connectionContent.Attributes["type"] != nil {