Skip to content

moveSync error does not have code property #734

Closed
@bmuenzenmeyer

Description

@bmuenzenmeyer
  • Operating System: Windows, and online REPLs
  • Node.js version: 12.13.0
  • fs-extra version: 8.1.0

First reported within facebook/create-react-app#7892 - moveSync errors thrown when the destination already exist do not have EEXISTS as a code property, causing defensive try catches (in that thread) to fall through

I isolated this behavior outside of CRA, and I think it serves as a proper reduced test case to discuss further.

✔️ [email protected] moveSync behavior with error.code
[email protected] moveSync behavior without error.code

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