Fix git issue with docker

Fix "An error has occurred: FatalError: git failed. Is it installed, and are you in a Git repository directory?" while running with docker tox 

docker run -v `pwd`:/tests -it --rm 31z4/tox tox -e style
This commit is contained in:
Tony Chia 2023-07-15 15:21:21 -07:00 committed by GitHub
parent cb825687a5
commit f7f220ad3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,6 +31,8 @@ commands = pytest -v --tb=short --basetemp={envtmpdir} {posargs:tests}
[testenv:style] [testenv:style]
deps = pre-commit deps = pre-commit
skip_install = true skip_install = true
allowlist_externals = git
commands_pre = git config --global --add safe.directory '*'
commands = pre-commit run --all-files commands = pre-commit run --all-files
[testenv:typing] [testenv:typing]