"Pre-commit not found" error when attempting to commit code with Cookieplone-based setup [SOLVED]

With my cookieplone-based setup, which was previously working, I'm getting the following error when trying to commit changes.

`pre-commit` not found.  Did you forget to activate your virtualenv?

Unless I'm activating the wrong virtualenv, I did activate the virtualenv.

apparently I activated the wrong virtualenv.
After deactivating it with the command deactivate
I ran:

source backend/.venv/bin/activate

Now commits work again :man_shrugging:

You're not supposed to have to activate the virtualenv. This looks like a bug that happens because of the way the template is installing pre-commit using pipx run. I created an issue but I'm not sure how to solve it yet. pre-commit hook stops working after a few days · Issue #119 · plone/cookieplone-templates · GitHub

Thanks for the bug report!