Skip to content
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

Space in path cause lefthook to fail #403

Closed
jrfoell opened this issue Dec 16, 2022 · 0 comments · Fixed by #404
Closed

Space in path cause lefthook to fail #403

jrfoell opened this issue Dec 16, 2022 · 0 comments · Fixed by #404
Labels
bug Something isn't working

Comments

@jrfoell
Copy link
Contributor

jrfoell commented Dec 16, 2022

🔧 Summary

A space in the the path containing lefthook will cause it to fail.

Lefthook version

1.2.6 7fa22dd

Steps to reproduce

  1. mkdir "my project"
  2. cd "my project"
  3. git init
  4. npm install @evilmartians/lefthook
  5. npx lefthook install
  6. echo "# hello" > readme.md
  7. git add readme.md
  8. git commit

Expected results

lefthook should run

Actual results

.git/hooks/prepare-commit-msg: line 21: /Users/username/my: No such file or directory

Possible Solution

Surround all eval functions with $dir in additional quotes.

Screenshots (if appropriate)

Screen Shot 2022-12-16 at 11 53 16 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant