Skip to content

transient EPERM errors on Windows #303

Open
@lukekarrys

Description

@lukekarrys

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions