From f7f220ad3f7d11d7aedb72ca3186605a9542f861 Mon Sep 17 00:00:00 2001 From: Tony Chia Date: Sat, 15 Jul 2023 15:21:21 -0700 Subject: [PATCH] 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 --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index cb735d28..bec4225a 100644 --- a/tox.ini +++ b/tox.ini @@ -31,6 +31,8 @@ commands = pytest -v --tb=short --basetemp={envtmpdir} {posargs:tests} [testenv:style] deps = pre-commit skip_install = true +allowlist_externals = git +commands_pre = git config --global --add safe.directory '*' commands = pre-commit run --all-files [testenv:typing]