Skip to content

Commit

Permalink
Ignore error if failed to update cache
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hov committed Jan 20, 2024
1 parent f303d44 commit 7aff61a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/lsp/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ func NewCache() *Cache {

func (s *server) UpdateCache(pkgPath string) {
pkg, err := PackageFromDir(pkgPath, false)
if err != nil {
panic(err)
if err == nil {
s.cache.pkgs.Set(pkgPath, pkg)
}
s.cache.pkgs.Set(pkgPath, pkg)
}

0 comments on commit 7aff61a

Please sign in to comment.