I am encounter an issue with prek in a specific context so it's perhaps not due to prek itself.
The issue is only on the CI when calling prek from copier. It's not on my laptop when I launch prek.
2026-06-10T08:52:37.811871Z DEBUG prek: 0.4.1
2026-06-10T08:52:37.811950Z DEBUG Args: ["/home/runner/.local/share/mise/installs/prek/0.4.1/prek-x86_64-unknown-linux-musl/prek", "run", "--color=always", "--all-files", "-vvv"]
2026-06-10T08:52:37.814114Z TRACE get_root: close time.busy=2.11ms time.idle=3.70µs
2026-06-10T08:52:37.814171Z DEBUG Git root: /tmp/tmp.ECOQeQ2Y9r
2026-06-10T08:52:37.814198Z DEBUG Found workspace root at `/tmp/tmp.ECOQeQ2Y9r`
2026-06-10T08:52:37.814228Z TRACE Include selectors: ``
2026-06-10T08:52:37.814236Z TRACE Skip selectors: ``
2026-06-10T08:52:37.814314Z DEBUG discover{root="/tmp/tmp.ECOQeQ2Y9r" config=None refresh=false}: Loaded workspace from cache
2026-06-10T08:52:37.814427Z DEBUG discover{root="/tmp/tmp.ECOQeQ2Y9r" config=None refresh=false}: Loading project configuration path=.pre-commit-config.yaml
2026-06-10T08:52:37.814883Z TRACE discover{root="/tmp/tmp.ECOQeQ2Y9r" config=None refresh=false}: close time.busy=625µs time.idle=2.03µs
2026-06-10T08:52:37.815153Z TRACE Checking lock resource="store" path=/home/runner/.cache/prek/.lock
2026-06-10T08:52:37.815180Z DEBUG Acquired lock resource="store"
2026-06-10T08:52:37.817375Z DEBUG Bootstrapping config tracking from workspace cache count=1
2026-06-10T08:52:37.823909Z TRACE No requires-python found in pyproject.toml hook=check-case-conflict
2026-06-10T08:52:37.824008Z TRACE No requires-python found in pyproject.toml hook=check-executables-have-shebangs
2026-06-10T08:52:37.824155Z TRACE No requires-python found in pyproject.toml hook=check-json
2026-06-10T08:52:37.824200Z TRACE No requires-python found in pyproject.toml hook=check-merge-conflict
2026-06-10T08:52:37.824244Z TRACE No requires-python found in pyproject.toml hook=check-symlinks
2026-06-10T08:52:37.824302Z TRACE No requires-python found in pyproject.toml hook=check-yaml
2026-06-10T08:52:37.824380Z TRACE No requires-python found in pyproject.toml hook=debug-statements
2026-06-10T08:52:37.824432Z TRACE No requires-python found in pyproject.toml hook=detect-aws-credentials
2026-06-10T08:52:37.824472Z TRACE No requires-python found in pyproject.toml hook=detect-private-key
2026-06-10T08:52:37.824545Z TRACE No requires-python found in pyproject.toml hook=end-of-file-fixer
2026-06-10T08:52:37.824589Z TRACE No requires-python found in pyproject.toml hook=mixed-line-ending
2026-06-10T08:52:37.824634Z TRACE No requires-python found in pyproject.toml hook=no-commit-to-branch
2026-06-10T08:52:37.824675Z TRACE No requires-python found in pyproject.toml hook=pretty-format-json
2026-06-10T08:52:37.824721Z TRACE No requires-python found in pyproject.toml hook=requirements-txt-fixer
2026-06-10T08:52:37.824760Z TRACE No requires-python found in pyproject.toml hook=trailing-whitespace
2026-06-10T08:52:37.824843Z TRACE No requires-python found in pyproject.toml hook=typos
2026-06-10T08:52:37.825103Z TRACE Using pyproject.toml-derived language_version hook=yamllint version=>=3.10
2026-06-10T08:52:37.825219Z TRACE Using pyproject.toml-derived language_version hook=zizmor version=>=3.10
2026-06-10T08:52:37.825288Z TRACE Released lock path=/home/runner/.cache/prek/.lock
2026-06-10T08:52:37.825365Z DEBUG Hooks going to run: ["check-case-conflict", "check-executables-have-shebangs", "check-json", "check-merge-conflict", "check-symlinks", "check-yaml", "debug-statements", "detect-aws-credentials", "detect-private-key", "end-of-file-fixer", "mixed-line-ending", "no-commit-to-branch", "pretty-format-json", "requirements-txt-fixer", "trailing-whitespace", "markdownlint-cli2", "typos", "yamllint", "actionlint-system", "packer_fmt", "packer_validate", "shellcheck", "zizmor"]
2026-06-10T08:52:37.825421Z TRACE ls_files{cwd="/tmp/tmp.ECOQeQ2Y9r" path="/tmp/tmp.ECOQeQ2Y9r"}: Executing `cd /tmp/tmp.ECOQeQ2Y9r && /usr/bin/git ls-files -z -- /tmp/tmp.ECOQeQ2Y9r`
2026-06-10T08:52:37.827895Z TRACE ls_files{cwd="/tmp/tmp.ECOQeQ2Y9r" path="/tmp/tmp.ECOQeQ2Y9r"}: close time.busy=1.06ms time.idle=1.42ms
2026-06-10T08:52:37.827945Z DEBUG All files in the workspace: 0
2026-06-10T08:52:37.828025Z TRACE Checking lock resource="store" path=/home/runner/.cache/prek/.lock
2026-06-10T08:52:37.828083Z DEBUG Acquired lock resource="store"
2026-06-10T08:52:37.828462Z TRACE Executing `/home/runner/.local/share/mise/installs/python/3.11.15/bin/python3.11 -I -c import sys, json
info = {
"version": ".".join(map(str, sys.version_info[:3])),
"base_exec_prefix": sys.base_exec_prefix,
}
print(json.dumps(info))
[...]`
2026-06-10T08:52:37.858738Z TRACE Executing `/usr/bin/node -p JSON.stringify({version: process.version, lts: process.release.lts || false})`
2026-06-10T08:52:37.901551Z TRACE Released lock path=/home/runner/.cache/prek/.lock
2026-06-10T08:52:37.901800Z TRACE Files for project `.` after filtered: 0
2026-06-10T08:52:37.901844Z TRACE get_diff{path="/tmp/tmp.ECOQeQ2Y9r"}: Executing `/usr/bin/git diff -- /tmp/tmp.ECOQeQ2Y9r`
2026-06-10T08:52:37.904052Z TRACE get_diff{path="/tmp/tmp.ECOQeQ2Y9r"}: close time.busy=364µs time.idle=1.85ms
check for case conflicts.............................(no files to check)Skipped
2026-06-10T08:52:37.904108Z DEBUG Running priority group with priority 0 with concurrency 2: ["check-case-conflict"]
2026-06-10T08:52:37.904147Z TRACE matching_filenames{hook="check-case-conflict"}: close time.busy=634ns time.idle=1.74µs
2026-06-10T08:52:37.904170Z TRACE Files for hook `check-case-conflict` after filtering matched=false filenames=0
check that executables have shebangs.................(no files to check)Skipped
2026-06-10T08:52:37.904248Z DEBUG Running priority group with priority 1 with concurrency 2: ["check-executables-have-shebangs"]
2026-06-10T08:52:37.904272Z TRACE matching_filenames{hook="check-executables-have-shebangs"}: close time.busy=524ns time.idle=780ns
2026-06-10T08:52:37.904293Z TRACE Files for hook `check-executables-have-shebangs` after filtering matched=false filenames=0
check json...........................................(no files to check)Skipped
check for merge conflicts............................(no files to check)Skipped
check for broken symlinks............................(no files to check)Skipped
check yaml...........................................(no files to check)Skipped
debug statements (python)............................(no files to check)Skipped
detect aws credentials...............................(no files to check)Skipped
detect private key...................................(no files to check)Skipped
fix end of files.....................................(no files to check)Skipped
mixed line ending....................................(no files to check)Skipped
2026-06-10T08:52:37.904348Z DEBUG Running priority group with priority 2 with concurrency 2: ["check-json"]
2026-06-10T08:52:37.904385Z TRACE matching_filenames{hook="check-json"}: close time.busy=430ns time.idle=683ns
2026-06-10T08:52:37.904404Z TRACE Files for hook `check-json` after filtering matched=false filenames=0
2026-06-10T08:52:37.904442Z DEBUG Running priority group with priority 3 with concurrency 2: ["check-merge-conflict"]
2026-06-10T08:52:37.904464Z TRACE matching_filenames{hook="check-merge-conflict"}: close time.busy=423ns time.idle=574ns
2026-06-10T08:52:37.904483Z TRACE Files for hook `check-merge-conflict` after filtering matched=false filenames=0
2026-06-10T08:52:37.904518Z DEBUG Running priority group with priority 4 with concurrency 2: ["check-symlinks"]
don't commit to branch...................................................Passed
- hook id: no-commit-to-branch
2026-06-10T08:52:37.904540Z TRACE matching_filenames{hook="check-symlinks"}: close time.busy=781ns time.idle=506ns
- duration: 0.00s
pretty format json...................................(no files to check)Skipped
fix requirements.txt.................................(no files to check)Skipped
trim trailing whitespace.............................(no files to check)Skipped
markdownlint-cli2....................................(no files to check)Skipped
typos................................................(no files to check)Skipped
yamllint.............................................(no files to check)Skipped
Lint GitHub Actions workflow files...................(no files to check)Skipped
Packer Format........................................(no files to check)Skipped
Packer Validate......................................(no files to check)Skipped
ShellCheck v0.11.0...................................(no files to check)Skipped
zizmor...............................................(no files to check)Skipped
2026-06-10T08:52:37.904558Z TRACE Files for hook `check-symlinks` after filtering matched=false filenames=0
2026-06-10T08:52:37.904592Z DEBUG Running priority group with priority 5 with concurrency 2: ["check-yaml"]
2026-06-10T08:52:37.904613Z TRACE matching_filenames{hook="check-yaml"}: close time.busy=486ns time.idle=525ns
2026-06-10T08:52:37.904631Z TRACE Files for hook `check-yaml` after filtering matched=false filenames=0
2026-06-10T08:52:37.904665Z DEBUG Running priority group with priority 6 with concurrency 2: ["debug-statements"]
2026-06-10T08:52:37.904687Z TRACE matching_filenames{hook="debug-statements"}: close time.busy=503ns time.idle=703ns
2026-06-10T08:52:37.904706Z TRACE Files for hook `debug-statements` after filtering matched=false filenames=0
2026-06-10T08:52:37.904740Z DEBUG Running priority group with priority 7 with concurrency 2: ["detect-aws-credentials"]
2026-06-10T08:52:37.904763Z TRACE matching_filenames{hook="detect-aws-credentials"}: close time.busy=478ns time.idle=625ns
2026-06-10T08:52:37.904781Z TRACE Files for hook `detect-aws-credentials` after filtering matched=false filenames=0
2026-06-10T08:52:37.904816Z DEBUG Running priority group with priority 8 with concurrency 2: ["detect-private-key"]
2026-06-10T08:52:37.904839Z TRACE matching_filenames{hook="detect-private-key"}: close time.busy=424ns time.idle=585ns
2026-06-10T08:52:37.904856Z TRACE Files for hook `detect-private-key` after filtering matched=false filenames=0
2026-06-10T08:52:37.904892Z DEBUG Running priority group with priority 9 with concurrency 2: ["end-of-file-fixer"]
2026-06-10T08:52:37.904923Z TRACE matching_filenames{hook="end-of-file-fixer"}: close time.busy=520ns time.idle=645ns
2026-06-10T08:52:37.904941Z TRACE Files for hook `end-of-file-fixer` after filtering matched=false filenames=0
2026-06-10T08:52:37.904979Z DEBUG Running priority group with priority 10 with concurrency 2: ["mixed-line-ending"]
2026-06-10T08:52:37.904999Z TRACE matching_filenames{hook="mixed-line-ending"}: close time.busy=492ns time.idle=692ns
2026-06-10T08:52:37.905017Z TRACE Files for hook `mixed-line-ending` after filtering matched=false filenames=0
2026-06-10T08:52:37.905052Z DEBUG Running priority group with priority 11 with concurrency 2: ["no-commit-to-branch"]
2026-06-10T08:52:37.905070Z TRACE Files for hook `no-commit-to-branch` after filtering matched=false filenames=0
2026-06-10T08:52:37.905227Z DEBUG run{hook_id=no-commit-to-branch language=python}: Running hook `no-commit-to-branch` in fast path
Repository not initialized yet, committing changes...
2026-06-10T08:52:37.905293Z TRACE run{hook_id=no-commit-to-branch language=python}: Executing `/usr/bin/git symbolic-ref HEAD`
2026-06-10T08:52:37.907711Z TRACE run{hook_id=no-commit-to-branch language=python}: close time.busy=591µs time.idle=2.01ms
2026-06-10T08:52:37.907788Z TRACE get_diff{path="/tmp/tmp.ECOQeQ2Y9r"}: Executing `/usr/bin/git diff -- /tmp/tmp.ECOQeQ2Y9r`
2026-06-10T08:52:37.911447Z TRACE get_diff{path="/tmp/tmp.ECOQeQ2Y9r"}: close time.busy=1.64ms time.idle=2.02ms
2026-06-10T08:52:37.911615Z DEBUG Running priority group with priority 12 with concurrency 2: ["pretty-format-json"]
2026-06-10T08:52:37.911648Z TRACE matching_filenames{hook="pretty-format-json"}: close time.busy=988ns time.idle=1.28µs
2026-06-10T08:52:37.911671Z TRACE Files for hook `pretty-format-json` after filtering matched=false filenames=0
2026-06-10T08:52:37.911714Z DEBUG Running priority group with priority 13 with concurrency 2: ["requirements-txt-fixer"]
2026-06-10T08:52:37.911737Z TRACE matching_filenames{hook="requirements-txt-fixer"}: close time.busy=497ns time.idle=679ns
2026-06-10T08:52:37.911757Z TRACE Files for hook `requirements-txt-fixer` after filtering matched=false filenames=0
2026-06-10T08:52:37.911793Z DEBUG Running priority group with priority 14 with concurrency 2: ["trailing-whitespace"]
2026-06-10T08:52:37.911814Z TRACE matching_filenames{hook="trailing-whitespace"}: close time.busy=469ns time.idle=540ns
2026-06-10T08:52:37.911833Z TRACE Files for hook `trailing-whitespace` after filtering matched=false filenames=0
2026-06-10T08:52:37.911869Z DEBUG Running priority group with priority 16 with concurrency 2: ["markdownlint-cli2"]
2026-06-10T08:52:37.911891Z TRACE matching_filenames{hook="markdownlint-cli2"}: close time.busy=474ns time.idle=570ns
2026-06-10T08:52:37.911910Z TRACE Files for hook `markdownlint-cli2` after filtering matched=false filenames=0
2026-06-10T08:52:37.911946Z DEBUG Running priority group with priority 17 with concurrency 2: ["typos"]
2026-06-10T08:52:37.911967Z TRACE matching_filenames{hook="typos"}: close time.busy=426ns time.idle=733ns
2026-06-10T08:52:37.911986Z TRACE Files for hook `typos` after filtering matched=false filenames=0
2026-06-10T08:52:37.912021Z DEBUG Running priority group with priority 18 with concurrency 2: ["yamllint"]
2026-06-10T08:52:37.912042Z TRACE matching_filenames{hook="yamllint"}: close time.busy=479ns time.idle=621ns
2026-06-10T08:52:37.912061Z TRACE Files for hook `yamllint` after filtering matched=false filenames=0
2026-06-10T08:52:37.912097Z DEBUG Running priority group with priority 19 with concurrency 2: ["actionlint-system"]
2026-06-10T08:52:37.912119Z TRACE matching_filenames{hook="actionlint-system"}: close time.busy=510ns time.idle=630ns
2026-06-10T08:52:37.912138Z TRACE Files for hook `actionlint-system` after filtering matched=false filenames=0
2026-06-10T08:52:37.912174Z DEBUG Running priority group with priority 20 with concurrency 2: ["packer_fmt"]
2026-06-10T08:52:37.912195Z TRACE matching_filenames{hook="packer_fmt"}: close time.busy=452ns time.idle=517ns
2026-06-10T08:52:37.912219Z TRACE Files for hook `packer_fmt` after filtering matched=false filenames=0
2026-06-10T08:52:37.912256Z DEBUG Running priority group with priority 21 with concurrency 2: ["packer_validate"]
2026-06-10T08:52:37.912277Z TRACE matching_filenames{hook="packer_validate"}: close time.busy=488ns time.idle=597ns
2026-06-10T08:52:37.912296Z TRACE Files for hook `packer_validate` after filtering matched=false filenames=0
2026-06-10T08:52:37.912364Z DEBUG Running priority group with priority 22 with concurrency 2: ["shellcheck"]
2026-06-10T08:52:37.912390Z TRACE matching_filenames{hook="shellcheck"}: close time.busy=538ns time.idle=670ns
2026-06-10T08:52:37.912410Z TRACE Files for hook `shellcheck` after filtering matched=false filenames=0
2026-06-10T08:52:37.912447Z DEBUG Running priority group with priority 23 with concurrency 2: ["zizmor"]
2026-06-10T08:52:37.912468Z TRACE matching_filenames{hook="zizmor"}: close time.busy=477ns time.idle=588ns
2026-06-10T08:52:37.912488Z TRACE Files for hook `zizmor` after filtering matched=false filenames=0
check for case conflicts.................................................Passed
check that executables have shebangs.....................................Passed
check json...............................................................Passed
check for merge conflicts................................................Passed
check for broken symlinks............................(no files to check)Skipped
check yaml...............................................................Passed
error: Failed to run hook `debug-statements`
caused by: Run command `python hook` failed
caused by: No such file or directory (os error 2)
Task '/tmp/copier._vcs.clone.acipk0te/scripts/./tasks.sh ' returned non-zero exit status 1.
Summary
Hello,
I am encounter an issue with prek in a specific context so it's perhaps not due to prek itself.
Here are the tools I am using:
The issue is only on the CI when calling prek from copier. It's not on my laptop when I launch prek.
Regards,
Willing to submit a PR?
Platform
Ubuntu 22.04
Version
0.4.1
.pre-commit-config.yaml
Log file