You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to remove a virtual environment where pre-commit-hooks has been installed with something like rm -r .venv, I get a few permission errors due to the .git folder being included when pre-commit-hooks is installed. For example
We get some permission errors to do with the pre-commit .git directory.
Temporary Solutions
The .venv folder can be removed with rm -rf .venv however avoiding having to use the --force option would be preferable.
Remove the .git folder using something like rm -rf .venv/src/pre-commit-hooks/.git which then lets you remove the .venv folder with rm -r .venv without the --force option which is slightly better.
Proposed Solution
Find a way to avoid including the .git when installing as pre-commit-hooks.
The text was updated successfully, but these errors were encountered:
Summary
When I try to remove a virtual environment where pre-commit-hooks has been installed with something like
rm -r .venv
, I get a few permission errors due to the.git
folder being included when pre-commit-hooks is installed. For exampleWould it be possible to remove the
.git
directory when installing pre-commit-hooks?Minimal Example
Create a directory with following simple structure.
The
pyproject.toml
is as follows.The
__init__.py
is empty.Install the
test_project
package.Then remove the
.venv
folder where the packages are installed.We get some permission errors to do with the pre-commit
.git
directory.Temporary Solutions
The
.venv
folder can be removed withrm -rf .venv
however avoiding having to use the--force
option would be preferable.Remove the
.git
folder using something likerm -rf .venv/src/pre-commit-hooks/.git
which then lets you remove the.venv
folder withrm -r .venv
without the--force
option which is slightly better.Proposed Solution
Find a way to avoid including the
.git
when installing as pre-commit-hooks.The text was updated successfully, but these errors were encountered: