[BUG] log cleanup procedure runs when logs-max=0 and throws error on permissions but not missing directory #6270
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When running
npm
withlogs_max=0
npm
still attempts to run the log cleanup routine. This routine attempts toscandir
. If this is happening in CI wherenpm
is being invoked as root this causes a permission error and warning to be output for everynpm run
command:What's odd though, is if the directory is non-existent, no warning is printed.
Expected Behavior
The cleanup routine not to run when
logs_max=0
.To not have warnings for every
npm run
command in CI :)Steps To Reproduce
logs-max=0
in the .npmrc orNPM_CONFIG_LOGS_MAX=
on the envEnvironment
The text was updated successfully, but these errors were encountered: