We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If the templates folder does not exist the ls will panic.
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x20 pc=0x105854460] goroutine 67 [running]: github.com/mrjosh/helm-ls/internal/handler.(*langHandler).LoadDocsOnNewChart.func1({0x14000054740, 0x3f}, {0x0?, 0x0?}, {0x14000054740?, 0x3f?}) github.com/mrjosh/helm-ls/internal/handler/text_document.go:109 +0x30\npath/filepath.WalkDir({0x14000054740, 0x3f}, 0x14000329f68) path/filepath/path.go:530 +0x50\ngit.luolix.top/mrjosh/helm-ls/internal/handler.(*langHandler).LoadDocsOnNewChart(0x140001e7880, {0x1400076e340?, 0x14000346190?}) github.com/mrjosh/helm-ls/internal/handler/text_document.go:107 +0x84 created by github.com/mrjosh/helm-ls/internal/handler.(*langHandler).NewChartWithInitActions in goroutine 13 github.com/mrjosh/helm-ls/internal/handler/initialization.go:100 +0xa8
The WalkDir function used here will call the WalkFunc with the error and fs info nil if the directory does not exist (see https://pkg.go.dev/path/filepath#WalkFunc). The current walk function does not check this error and panics. https://github.com/mrjosh/helm-ls/blob/master/internal/handler/text_document.go#L108
The text was updated successfully, but these errors were encountered:
fix(loadDocs): avoid panic if template dir does not exist
0acfa38
fixes #95
9698011
Successfully merging a pull request may close this issue.
If the templates folder does not exist the ls will panic.
The WalkDir function used here will call the WalkFunc with the error and fs info nil if the directory does not exist (see https://pkg.go.dev/path/filepath#WalkFunc). The current walk function does not check this error and panics.
https://github.com/mrjosh/helm-ls/blob/master/internal/handler/text_document.go#L108
The text was updated successfully, but these errors were encountered: