Skip to content

fix(find): skip unreadable directories instead of crashing - #1262

Open
Hashim1999164 wants to merge 1 commit into
shelljs:mainfrom
Hashim1999164:fix/find-skip-eperm-on-windows
Open

fix(find): skip unreadable directories instead of crashing#1262
Hashim1999164 wants to merge 1 commit into
shelljs:mainfrom
Hashim1999164:fix/find-skip-eperm-on-windows

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • Replaces find's fast-glob recursion with a directory walker that reports permission denied and keeps scanning when readdir hits EPERM or EACCES
  • Adds a regression test for unreadable directories on Unix-like systems

Fixes #1095

Test plan

  • npm test -- test/find.js
  • npm run lint

Replace fast-glob based recursion with a directory walker that
continues when readdir hits EPERM or EACCES, matching Unix find
behavior on Windows and other platforms.

Fixes shelljs#1095
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find command crashes when trying to scan Directories without Permission on Windows

1 participant