Open
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
npm doctor
complains about every non-executable file in global bin
folder:
Checking permissions on global bin folder
npm error doctor checkFilesPermission Missing permissions on /opt/homebrew/bin/.keepme (expect: executable)
Not ok
Check the permissions of files in /opt/homebrew/bin
There is no requirement for every file in global bin folders to be executable. In this case, the file is kept by macOS Homebrew to prevent folder deletion if it ever becomes empty. Making it executable would make it globally available as a command, even though it has no contents.
Expected Behavior
Without breaking the existing behavior, npm doctor
could:
- Exclude files with zero size — there is no point to expect them to be executable
- Exclude files starting with period
- Both of the above
Steps To Reproduce
- Install Homebrew on fresh Mac: https://brew.sh
- Install Node via Homebrew:
brew install node
- Run
npm doctor
- See unwarranted
checkFilesPermission
complaint
Environment
- npm: v11.4.2
- Node.js: 24.3.0
- OS Name: macOS 15.5
- Extra: have Homebrew installed