"codecrafters test" permission denied on WSL (copying ./vs/...*.idx)

I’m stuck on Stage #RG2.

When I run the ‘codecrafters test’ command, the following error is output:

make a repo temp copy: copy files: open codecrafters-redis-csharp/.vs/codecrafters-redis-csharp/FileContentIndex/3ad90655-af23-48fd-94b8-ff1dbb66b770.vsidx: permission denied

I’ve tried reinstalling the codecrafters CLI and checking user permissions but the issue persists.

However, if I push to the repo, it tests and executes without issue. It just doesn’t work locally with the codecrafters CLI.

Does anyone know what might be causing this?

@Aqiil could you try removing .vs once (rm -rf .vs/), and see if this issue persists? I’ve seen this happen before but it was because I messed up the permissions in my repository at some point.

Received a similar report of this from another user too. Moved to Bug Reports.

We’re looking into what possible solutions there are here.

A temporary workaround is to remove .vs/ (rm -rf ./vs) and then run codecrafters test. This fix is temporary, the .vs/ folder will be back soon enough once you edit files in VS Code and save again.

Apologies for the late reply.

I managed to solve this issue by closing Visual Studio, executing ‘codecrafters test’ (which then works) and re-opening the editor back up again.

I’ve had this occur twice so far and I’m not sure what’s causing it but do let me know if you pinpoint the root of the issue.