Skip to content

Commit

Permalink
fix(loadDocs): avoid panic if template dir does not exist
Browse files Browse the repository at this point in the history
fixes #95
  • Loading branch information
qvalentin committed Jul 22, 2024
1 parent 3d84638 commit 0acfa38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/handler/text_document.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ func (h *langHandler) DidRenameFiles(ctx context.Context, params *lsp.RenameFile
func (h *langHandler) LoadDocsOnNewChart(rootURI uri.URI) {
_ = filepath.WalkDir(filepath.Join(rootURI.Filename(), "templates"),
func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
}
if !d.IsDir() {
return h.documents.Store(uri.File(path), h.helmlsConfig)
}
Expand Down

0 comments on commit 0acfa38

Please sign in to comment.