Skip to content

Husky@next change its GIT_PARAMS to HUSKY_GIT_PARAMS #366

@MondoGao

Description

@MondoGao

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions