Skip to content

Being more permissive to files changing under insta #380

@max-sixty

Description

@max-sixty

I'm often getting an error: error: No such file or directory (os error 2) which exits the process.

I get this when reviewing snapshots, and occasionally when just running cargo insta test --accept.

When reviewing a snapshot, I think it's because a pending snapshot has been removed by another process. I had a look for where in the code it was doing the file reading, but actually couldn't find it after 10 minutes and thought posting an issue was reasonable — if you can point me in the right direction I could change this to print an warning but then continue — if there's no longer a pending snapshot then skipping its review seems very reasonable?

I'm not sure why it happens when running cargo insta test --accept. Any ideas?

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