stevenaldinger/decker

Fatal when using a new plugin

Closed this issue · 1 comments

Hi, i have the following error while trying to use a new plugin in an HCL file (plugin compile successfully) :

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x879dcd]

goroutine 1 [running]:
github.com/stevenaldinger/decker/internal/pkg/hcl.parsePluginHCL(0xc0000844e0, 0x56, 0x4b)
        /go/src/github.com/stevenaldinger/decker/internal/pkg/hcl/plugins.go:23 +0x11d
github.com/stevenaldinger/decker/internal/pkg/hcl.GetResourceBlockSchema(0xc0000a5ab6, 0x6, 0x7f6a8a1ebfff)
        /go/src/github.com/stevenaldinger/decker/internal/pkg/hcl/hcl_schema.go:98 +0xcb
github.com/stevenaldinger/decker/internal/pkg/hcl.getResourceContent(0xc00009bd40, 0x0)
        /go/src/github.com/stevenaldinger/decker/internal/pkg/hcl/resources.go:11 +0x5b
github.com/stevenaldinger/decker/internal/pkg/hcl.GetExprVars(0xc00009bd40, 0xc00014f6a0)
        /go/src/github.com/stevenaldinger/decker/internal/pkg/hcl/resources.go:26 +0x40
github.com/stevenaldinger/decker/internal/pkg/dependencies.addEdgesToGraph(0xc000091ec0, 0xc00008f960, 0x2, 0x2, 0xc00014f640, 0xc00014f638)
        /go/src/github.com/stevenaldinger/decker/internal/pkg/dependencies/graph.go:56 +0x153
github.com/stevenaldinger/decker/internal/pkg/dependencies.Sort(0xc00008f960, 0x2, 0x2, 0xc00008f9d0, 0x1, 0x1)
        /go/src/github.com/stevenaldinger/decker/internal/pkg/dependencies/graph.go:107 +0x259
main.main()
        /go/src/github.com/stevenaldinger/decker/cmd/decker/main.go:36 +0xed

I can't figure out why

Edit: Name of plugin must be lowercase