Replies: 4 comments 1 reply
-
|
Thank you for reporting this! Could you share your config? Or a minimal config (e.g. specific command that triggers this error)? I want to try reproducing this bug |
Beta Was this translation helpful? Give feedback.
-
|
i think i found a lead: I hae a git repo with two "projects" in subdirs of the git repo root: gui and api. For completeness my hook definition: output:
# - meta # Print lefthook version
- summary # Print summary block (successful and failed steps)
# - empty_summary # Print summary heading when there are no steps to run
- success # Print successful steps
- failure # Print failed steps printing
- execution # Print any execution logs (but prints if the execution failed)
- execution_out # Print execution output (but still prints failed commands output)
# - execution_info # Print `EXECUTE > ...` logging
- skips # Print "skip" (i.e. no files matched)
commit-msg:
run: commitlint --edit {1}
pre-commit:
parallel: true
commands:
# JS, css etc.
biome:
tags: gui style
root: "gui/"
glob: "*.{svelte,js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
exclude: "mockServiceWorker.js "
run: biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
stage_fixed: true
eslint:
tags: gui style
root: "gui/"
glob: "src/**/*.{svelte}"
run: eslint --cache --fix {staged_files}
stage_fixed: true
# Python stuff
ruff_format:
tags: api style
root: "api"
glob: "*.py"
run: ruff format {staged_files}
stage_fixed: true
ruff_check:
tags: api
root: "api"
glob: "*.py"
run: ruff check --fix {staged_files}
stage_fixed: true
# generic stuff
merge_conflict:
run: ( ! rg '^<<<<<<< ' {staged_files} )
scripts:
check-branch.sh:
runner: bash
skip:
- merge
- rebase
pre-push:
parallel: true
commands:
test_js:
root: "gui/"
glob: "*.{js,svelte,ts,jsx,tsx}"
run: pnpm test --silent
only:
- ref: develop
test_python:
root: "api"
glob: "*.{py}"
# run: python -m pytest -q --log-level=WARNING -o log_cli=false
run: poetry run -- python -m pytest -q --log-level=WARNING -o log_cli=false
only:
- ref: develop
|
Beta Was this translation helpful? Give feedback.
-
|
Another observation: The error message text (slightly anonymized...): |
Beta Was this translation helpful? Give feedback.
-
|
Also opened a issue on IntelliJ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
whenever i commit something i get this message since a while:
The file mentioned is gone as soon as i have the shell again, so i assume that lefthook, or one of its hooks, is too fast and outpaces itself somewhere...
But why? And where?
And how to debug this?
Output of a
git commit. slightly anonymized:The commit is fine as in git has it, not sure what fails, i thinks, it's the fixed file (by ruff?) that's not committed / staged correctly, so only "my" version before the fixes is in git.
Beta Was this translation helpful? Give feedback.
All reactions