Skip to content

Husky@next change its GIT_PARAMS to HUSKY_GIT_PARAMS #366

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

Closed
1 of 4 tasks
MondoGao opened this issue Jun 8, 2018 · 1 comment · Fixed by #428
Closed
1 of 4 tasks

Husky@next change its GIT_PARAMS to HUSKY_GIT_PARAMS #366

MondoGao opened this issue Jun 8, 2018 · 1 comment · Fixed by #428

Comments

@MondoGao
Copy link

MondoGao commented Jun 8, 2018

Expected Behavior

Work well with husky.

Current Behavior

I config my husky with README below,:
image

But I got a error during commiting:

Error: Recieved 'GIT_PARAMS' as value for -E | --env, but environment variable 'GIT_PARAMS' is not available globally
    at getEditValue (path/to/project/node_modules/@commitlint/cli/lib/cli.js:204:10)

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

I found a comment from your code:
image

and I change GIT_PARAMS to HUSKY_GIT_PARAMS in husky's config

---
hooks:
  pre-commit: pretty-quick --staged
  commit-msg: commitlint -E HUSKY_GIT_PARAMS

Steps to Reproduce (for bugs)

  1. Install husky@next(rc_8)
  2. Config husky like below screenshot
  3. Commit
.huskyrc.yml ```yaml --- hooks: pre-commit: pretty-quick --staged commit-msg: commitlint -E GIT_PARAMS ```

Context

There should be a info/tip in README to help people resolve this problem.

Your Environment

Executable Version
commitlint --version 7.0.0
git --version 2.17.0
node --version 9.11.1
@nolazybits
Copy link

Took me a while to come here and find proper config
Docs should be updated on commitlint
Anyhow thanks for the info @MondoGao 👍

kotarella1110 referenced this issue in kotarella1110-sandbox/react-boilerplate Aug 9, 2018
* commitlint を追加
* commitlint がまだ husky@next に対応していないため husky をダウングレード
https://github.com/marionebl/commitlint/issues/366
marionebl pushed a commit that referenced this issue Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants