You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I always reach for rimraf when I hit Windows specific filesystem errors. This eliminates them and then I don't have to think about Windows specific filesystem errors.
I recently hit a case that rimraf didn't fix. When trying to remove a 25mb exe file on CI in Windows, I would get EPERM errors that rimraf would eventually throw on. I eventually found two work arounds:
Retry on EPERM errors. In one case it took 4 seconds before it finally worked.
Use rimraf.moveRemove directly
I think both of those fixes could be applied in rimraf but I'm not sure which would be safer for general use. Having looked at the code I think the options would be:
I think falling back to moveRemove right away is the better approach. Retrying for 4 seconds is pretty brutal, and if it's just single files here and there, then moveRemove wouldn't be too terrible.
I always reach for
rimraf
when I hit Windows specific filesystem errors. This eliminates them and then I don't have to think about Windows specific filesystem errors.I recently hit a case that rimraf didn't fix. When trying to remove a 25mb exe file on CI in Windows, I would get
EPERM
errors that rimraf would eventually throw on. I eventually found two work arounds:rimraf.moveRemove
directlyI think both of those fixes could be applied in rimraf but I'm not sure which would be safer for general use. Having looked at the code I think the options would be:
EPERM
to the list of retryable busy codes inrimraf/src/retry-busy.ts
Line 8 in d2fa213
EPERM
instead of onlyENOTEMPTY
inrimraf/src/rimraf-windows.ts
Line 41 in d2fa213
The text was updated successfully, but these errors were encountered: