Patch is not applied under windows (not a CRLF problem)
See original GitHub issueIt seems that the latest patch-package has issues working under windows (I did not check the other versions). My patch file has LF endings, the file in node_modules/ also does.
$ patch-package
patch-package: Applying patches...
**ERROR** Failed to apply patch for package jison-lex
...
Note that the patch applied successfully through
$ patch -p1 -i patches/jison-lex+0.3.4.patch
patching file node_modules/jison-lex/regexp-lexer.js
Maybe just use patch
in your package? 😃
That patch that I am using is here: https://github.com/roman-spiridonov/sandbox/tree/master/[Stanford] Compilers/cool-jison.
P.S. I do not know how to create and apply the patch through git diff
/git apply
manually, because node_modules/ folder is in my global .gitignore. Note that patch is created just fine but I cannot apply that.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Cannot patch file with CRLF line endings · Issue #1973 - GitHub
Unfortunately, the only way to patch a file with CRLF line endings seems to be using the --binary option with a CRLF patch...
Read more >How to use patches created in windows (with CRLF) in linux?I
The Linux patch command will not recognize a patchfile that has CRLF in the patch 'meta-lines'. The line-endings of the actual patch content...
Read more >CRLF line endings cause problems with "git apply" - Drupal
Problem /Motivation The template files (.tpl.php) that generate the ical feed have DOS-style (CRLF) line endings. This is a good thing.
Read more >Patch does not apply when staging lines | Sourcetree For Mac
This problem can be resolved by changing the line endings back to LF. Similarly, the problem can be reproduced by converting a file...
Read more >How to fix "Hunk #1 FAILED at 1 (different line endings ...
GNU patch does not have an option to tell it to transform a patch with LF endings into CRLF to apply to files...
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 Free
Top 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
Published in 3.6.0 🎉
Great! I should have a permanent fix for this later tonight.