[#7632] added missing error check in the jsvm watcher

This commit is contained in:
Gani Georgiev
2026-04-09 09:52:16 +03:00
parent 0695ca254d
commit f89858f1ec

View File

@@ -440,8 +440,8 @@ func (p *plugin) watchHooks() error {
//
// @todo replace once recursive watcher is added (https://github.com/fsnotify/fsnotify/issues/18)
dirsErr := filepath.WalkDir(watchDir, func(path string, entry fs.DirEntry, err error) error {
// ignore hidden directories, node_modules, symlinks, sockets, etc.
if !entry.IsDir() || entry.Name() == "node_modules" || strings.HasPrefix(entry.Name(), ".") {
// skip access failures, hidden directories, node_modules, etc.
if err != nil || !entry.IsDir() || entry.Name() == "node_modules" || strings.HasPrefix(entry.Name(), ".") {
return nil
}