-
Notifications
You must be signed in to change notification settings - Fork 933
Error with Husky v1.0.0-rc.2 on Windows #319
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
Comments
Thanks for reporting! I'd like to go with you second option, but fuse it into the existing
For A PR for this would be very welcome ❤️! What do you think? |
I thought about fusing it with Also, not sure how to display correct error message in case path or env variable is missing? |
Ran into same problem. Is this correct for Windows? |
fixes #319. additionally fixes some minor typos in docs
how to write our own custom rule for git commit message? |
Husky updates changed env. params and argument call, see https://github.com/marionebl/commitlint/issues/319#issue-318569827 and https://github.com/marionebl/commitlint/pull/343
Husky updates changed env. params and argument call, see https://github.com/marionebl/commitlint/issues/319#issue-318569827 and https://github.com/marionebl/commitlint/pull/343
Husky updates changed env. params and argument call, see https://github.com/marionebl/commitlint/issues/319#issue-318569827 and https://github.com/marionebl/commitlint/pull/343
Husky updates changed env. params and argument call, see https://github.com/marionebl/commitlint/issues/319#issue-318569827 and https://github.com/marionebl/commitlint/pull/343
Husky updates changed env. params and argument call, see https://github.com/marionebl/commitlint/issues/319#issue-318569827 and https://github.com/marionebl/commitlint/pull/343
Hi @marionebl,
In next version of husky,
GIT_PARAMS
env variable is going to be scoped (mainly to avoid collisions and be more explicit that it's coming from husky) but it creates a bug with commitlint.https://github.com/typicode/husky/blob/dev/CHANGELOG.md#100-rc1
typicode/husky#268
Affected packages
Possible Solution
I've checked commitlint code, and I see 2 potential solutions.
Use cross-env
cross-env
comes withcross-env-shell
which lets you write env variable the linux way with$
and it makes it compatible with Windows.Add an option to commitlint CLI
It should be possible also to add, for example, a
--env/-E
option to commitlint-cli to define which environment variable it should look for inprocess.env
without relying on OS specific syntax.I personally like the second one as it doesn't involve downloading another package. Probably you have other ideas as well. Let me know what you think about it and if you want me to make a PR :)
Steps to Reproduce (for bugs)
mkdir test && cd test
git init && npm init -y
npm install --save-dev @commitlint/{config-conventional,cli}
npm install --save-dev husky@next
(1.0.0-rc.2
)package.json
git add something
andgit commit -m foo
Your Environment
commitlint --version
git --version
node --version
OS
The text was updated successfully, but these errors were encountered: