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

lefthook package is missing postinstall script #294

Closed
fantua opened this issue Jul 10, 2022 · 3 comments · Fixed by #310
Closed

lefthook package is missing postinstall script #294

fantua opened this issue Jul 10, 2022 · 3 comments · Fixed by #310

Comments

@fantua
Copy link
Contributor

fantua commented Jul 10, 2022

Trying to use lefthook package according to this doc via:

yarn add -D lefthook

But pre-commit hooks doesn't work because there is no postinstall script:

{
"name": "lefthook",
"version": "1.0.4",
"description": "Simple git hooks manager",
"main": "index.js",
"repository": "https://github.com/evilmartians/lefthook",
"bin": {
"lefthook": "bin/index.js"
},
"keywords": [
"git",
"hook",
"manager"
],
"author": "mrexox",
"license": "MIT",
"bugs": {
"url": "https://github.com/evilmartians/lefthook/issues",
"email": "lefthook@evilmartians.com"
},
"homepage": "https://github.com/evilmartians/lefthook#readme",
"optionalDependencies": {
"lefthook-darwin-arm64": "1.0.4",
"lefthook-darwin-x64": "1.0.4",
"lefthook-linux-arm64": "1.0.4",
"lefthook-linux-x64": "1.0.4",
"lefthook-windows-arm64": "1.0.4",
"lefthook-windows-x64": "1.0.4"
}
}

It exist only for @evilmartians/lefthook package:

"postinstall": "node postinstall.js"

Is it expected?

@mrexox
Copy link
Member

mrexox commented Jul 15, 2022

Hi! It is not expected because lefthook package has optional dependencies which resolve for each OS and arch.

@mrexox
Copy link
Member

mrexox commented Jul 17, 2022

@fantua Did you run yarn run lefthook install after installation?

@fantua
Copy link
Contributor Author

fantua commented Jul 21, 2022

@fantua Did you run yarn run lefthook install after installation?

No, I didn't. I expected this to be done automatically (using postinstall hook). Same as it’s done in @evilmartians/lefthook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants