No HUSKY_GIT_PARAMS not available
See original GitHub issueHello,
I am trying to make commitlint work with husky v5 but I am getting the following error:
Error:
Error: Recieved 'HUSKY_GIT_PARAMS' as value for -E | --env, but environment variable 'HUSKY_GIT_PARAMS' is not available globally
package.json
"@commitlint/cli": "^11.0.0", "@commitlint/config-conventional": "^11.0.0" "husky": "^5.0.4",
thanks for the help!
UPDATE:
Fixed it with this: `# .husky/pre-commit
…
npx --no-install commitlint --edit $1
or
yarn commitlint --edit $1`
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
How to access commit message with Husky pre-commit hook?
A pre-commit hook would not access the commit message, because the hook is triggered before the commit creation. A commit-msg hook is the ......
Read more >@micaelomota/husky-do-not-use-me - npm
Start using @micaelomota/husky-do-not-use-me in your project by running `npm i ... There are no other projects in the npm registry using ...
Read more >Files changed (15) - Renovate Bot Package Diff
- Git hooks can get parameters via command-line arguments and stdin. `husky` makes them accessible via `HUSKY_GIT_PARAMS` and `HUSKY_GIT_STDIN` environment ...
Read more >Package Diff: @commitlint/cli @ 7.5.2 .. 7.6.0
HUSKY_GIT_PARAMS ;\n\t\t}\n\t\tthrow new Error(\n\t\t\t`Received ${edit} as value for -e | --edit, but GIT_PARAMS or HUSKY_GIT_PARAMS are not available ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Exact sollution https://typicode.github.io/husky/#/?id=husky_git_params-ie-commitlint-
Just went through this issue, you have husky v5 and need to follow the v5 conventions per the v5 docs. https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v5