-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command titles get truncated if they contain a dot #864
Comments
Wait, this is actually much worse than I thought! If a title contains a dot, the command isn't even executed at all!
➜ pnpm lefthook run pre-commit
╭──────────────────────────────────────╮
│ 🥊 lefthook v1.8.2 hook: pre-commit │
╰──────────────────────────────────────╯
sync hooks: ✔️ (pre-commit, post-merge, _shared_, post-checkout, post-rewrite)
┃ if title contains dot ❯
────────────────────────────────────
summary: (done in 0.02 seconds)
✔️ if title contains dot
➜ $?
zsh: command not found: 0 |
Hey! Yes, this is a side effect of using some.nested.option:
value: true is the same as some:
nested:
option:
value: true But this is YAML syntax, and there's (probably) nothing to do with it. Right now I'm working on a slightly different way to configure lefthook. It solves this issue because it doesn't use keys for command names. |
...I really hate YAML. If you're changing the config format, it might be worth considering support for different config format. Even JSON is preferable, YAML has so many edge cases. |
Actually lefthook supports JSON and TOML. Do |
Thanks! I think this issue can be closed. Maybe the most we could do is add a warning to the docs? |
🔧 Summary
If a command title contains a dot (
.
), everything after the dot is omitted in lefthook output:Lefthook version
1.8.2 9996e0d9db43a6b856074d2b836adf924a24b992
Steps to reproduce
Expected results
➜ pnpm lefthook run pre-commit ╭──────────────────────────────────────╮ │ 🥊 lefthook v1.8.2 hook: pre-commit │ ╰──────────────────────────────────────╯ sync hooks: ✔️ (post-rewrite, pre-commit, post-merge, post-checkout, _shared_) ┃ everything after the dot. will be missing ❯ ──────────────────────────────────── summary: (done in 0.02 seconds) ✔️ everything after the dot. will be missing
Actual results
➜ pnpm lefthook run pre-commit ╭──────────────────────────────────────╮ │ 🥊 lefthook v1.8.2 hook: pre-commit │ ╰──────────────────────────────────────╯ sync hooks: ✔️ (post-rewrite, pre-commit, post-merge, post-checkout, _shared_) ┃ everything after the dot ❯ ──────────────────────────────────── summary: (done in 0.02 seconds) ✔️ everything after the dot
Logs / Screenshots
The text was updated successfully, but these errors were encountered: