Fix: local calls to pre-commit tox profile 18/67818/8
authorGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 26 May 2021 18:56:25 +0000 (20:56 +0200)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Sun, 30 May 2021 07:19:49 +0000 (07:19 +0000)
commit75e1fb0ddfd280e3f0869889fb87c2fbde395ef3
treee0aba7bd2a9038b83e6bf6fe4801b2af6c240659
parentc284ce932a63701cc5c5711c551f38cb1c5705ed
Fix: local calls to pre-commit tox profile

When run locally, pre-commit tox profile resulted in the following
failure:
$ tox -e pre-commit
[..]
gitlint...........................................................Failed
- hook id: gitlint
- exit code: 254

An error occurred while executing \
'/usr/bin/git config --get user.name': b''

The reason behind is that tox virtualenv cannot directly access the
$HOME shell variable to retrieve the local git configuration unless
this variable is explicitly declared accessible via the passenv tox
parameter.
This is required by gitlint to retrieve the correct git configuration
parameters.

Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I99197f88cf4024a5922fe62ec07610921dcf515f
tox.ini