Windows line endings in config breaks CLI
See original GitHub issueExpected 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
- cli
- core
- prompt
- config-angular
Possible Solution
Add support for windows line endings in CLI
Steps to Reproduce (for bugs)
- Open Windows machine
- Run
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
- Run
commitlint
Context
Trying to setup commitlint
in my project on Windows
Your Environment
Executable | Version |
---|---|
commitlint --version |
5.6.0 |
git --version |
git version 2.16.0.windows.2 |
node --version |
v8.9.1 |
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Configuring Git to handle line endings - GitHub Docs
autocrlf command is used to change how Git handles line endings. It takes a single argument. On Windows, you simply pass true to...
Read more >Fixing misaligned Linux and Windows line endings
Windows and Linux line endings don't match, which causes trouble if you're moving files from a Windows desktop to a Linux container.
Read more >Introducing extended line endings support in Notepad
New files created within Notepad will use Windows line ending (CRLF) by default, but it will now be possible to view, edit, and...
Read more >Preserve line endings - windows - Stack Overflow
If file contains both \n ( 0x0A ) and \r\n ( 0x0D 0x0A ) - this proposed solution (of always re-injecting the \r)...
Read more >CRLF vs. LF: Normalizing Line Endings in Git
If one developer uses Windows and another uses Mac or Linux, and they each save and commit the same files, they may see...
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
for anyone still coming back after this long, i had the issue and i fixed it after 30m of head smashing
for windows then delete original and rename new (so it doesnt say used by another process)
On Windows, must through the notepad to open the file,Through the save as, change document character set!