insta icon indicating copy to clipboard operation
insta copied to clipboard

Being more permissive to files changing under insta

Open max-sixty opened this issue 1 year ago • 0 comments

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?

max-sixty avatar Jun 09 '23 19:06 max-sixty