pre-commit: shutil.Error while installing hooks (alpine docker, musl)
We are moving to docker based CI and I’m trying to build a pre-commit testing container that is pre-populated with our hooks. Could you help me diagnose the cause of this failure? When the hooks try to install I get:
Initialized empty Git repository in /root/pre-commit/.git/
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.git.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.git.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: Command: ('/root/.cache/pre-commit/repojfihsrn1/py_env-python3.5/bin/python3.5', '/root/.cache/pre-commit/repojfihsrn1/py_env-python3.5/bin/pip', 'install', '.')
Return code: 2
Expected return code: 0
Output:
Processing /root/.cache/pre-commit/repojfihsrn1
Stack trace attached github-issue-655-trace.txt
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 22 (15 by maintainers)
Thanks @asottile 🤞 And I agree with @FatherShawn: you’re the 💥
@hectorv I’ve been trying to get the python devs to review my change without luck: https://github.com/python/cpython/pull/4783
I ran into this today on our Python 3 + Alpine projects. Unfortunately, the mandate from above is more Python 3 and more Alpine… 🗻
Nice, I have it reproducing with this dockerfile:
And output: