Env creation left incomplete when initial install failed
On v1.7.0, I tried
- Cloning https://github.com/googlefonts/fontra.git
- Running
hatch run fontra
but I had a too old version of nodejs installed, so the initial installation failed. After installing a nodejs 18, I tried the command again but was told that "fontra" is not a known command. I had to "hatch env prune" and try again. It would be nice if hatch did that automatically when initial craetion fails.
I will do that, thanks!
Same thing happened to me on a Windows 11 machine and Hatch version 1.14.0. I ran hatch test for a project, but the build failed due to a permissions error (this one to be exact). I restarted my Command Prompt as Administrator and when re-executing hatch test I no longer got the permissions error, but the Python conftest.py test entry point script failed with a ModuleNotFoundError with the module being the exact one of the project I was trying to run tests for. It took me forever to figure out what was going on, but it was this! I simply had to execute hatch env prune and then hatch test worked immediately after that. Is that not a bug that the broken environment is being cached?