We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Similar issue to #403. A project directory containing a space causes issues.
1.7.15 5ad1281
$ mkdir "my project"
$ cd "my project"
$ git init
$ npm install @evilmartians/lefthook
$ npx lefthook install
$ echo "# hello" > readme.md
$ git add readme.md
lefthook.yml
prepare-commit-msg: scripts: "my-script.sh": runner: bash
.lefthook/prepare-commit-msg/my-script.sh
#!/bin/bash echo "prepare-commit-msg script ran"
$ git commit
Commit loads editor and on completion, prepare-commit-msg hook echoes "prepare-commit-msg script ran".
Git commit command fails as the prepare-commit-msg hook fails to execute, with the message:
| my-script.sh > bash: /path/to/my: No such file or directory
The script to execute via the runner should be quoted.
The text was updated successfully, but these errors were encountered:
Hey! Thank you for creating this issue. What's your OS? Is it Windows?
Sorry, something went wrong.
Sorry-- should have included that: macOS (Sonoma).
Can confirm this fixes the issue. Thanks for the quick update / release!
Successfully merging a pull request may close this issue.
🔧 Summary
Similar issue to #403. A project directory containing a space causes issues.
Lefthook version
1.7.15 5ad1281
Steps to reproduce
$ mkdir "my project"
$ cd "my project"
$ git init
$ npm install @evilmartians/lefthook
$ npx lefthook install
$ echo "# hello" > readme.md
$ git add readme.md
lefthook.yml
file that declares:.lefthook/prepare-commit-msg/my-script.sh
(and chmod +x):$ git commit
Expected results
Commit loads editor and on completion, prepare-commit-msg hook echoes "prepare-commit-msg script ran".
Actual results
Git commit command fails as the prepare-commit-msg hook fails to execute, with the message:
Possible Solution
The script to execute via the runner should be quoted.
Logs / Screenshots
The text was updated successfully, but these errors were encountered: