-
Notifications
You must be signed in to change notification settings - Fork 932
Windows line endings in config breaks CLI #270
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
Also seen in #231 |
I don't have a win32 machine and can't reproduce this on macOS: Can you please add the full stack trace to the report? Also, what terminal emulator are you using to create |
How can I get the full stack trace? I'm using CMDer (conemu) |
I meant the complete console output as you see it in the terminal window where the error is thrown. |
Can you upload your |
|
I fumbled around with the file (thanks for providing it!) and my tests indicate this is not caused by It is the encoding, which is There is nothing |
I understand limitations in programs and such, but if I might offer a suggestion - it might be nice to have this documented for others in the future who may run into the same problem. I thought it was a windows issue because |
The default config of encoding of VSCode in my machine is |
By Default in VS code i have UTF-8 still it gives me error
commitlint.config.js
|
I got the same bug. Any one else solve this bug? |
for anyone still coming back after this long, i had the issue and i fixed it after 30m of head smashing Get-Content commitlint.config.js | Set-Content -Encoding utf8 commitlint.config-utf8.js for windows then delete original and rename new (so it doesnt say used by another process) |
Windows: Get-Content commitlint.config.js | Set-Content -Encoding utf8 commitlint.config-utf8.js
rm .\commitlint.config.js
Get-Content commitlint.config-utf8.js | Set-Content -Encoding utf8 commitlint.config.js
rm .\commitlint.config-utf8.js
echo 'hello world' | commitlint And yeah! It works like a charm now... |
Expected Behavior
If you have windows line endings in your config file, things should run as normal
Current Behavior
If you run the recommended
echo
command on Windows, it will break things as it will output Windows Line Endings.Affected packages
Possible Solution
Add support for windows line endings in CLI
Steps to Reproduce (for bugs)
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
commitlint
Context
Trying to setup
commitlint
in my project on WindowsYour Environment
commitlint --version
git --version
node --version
The text was updated successfully, but these errors were encountered: