-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Update documentation for Windows #21
Comments
Thanks, this chimes with what I discovered while debugging #20 last night. I'll try that out and update the README if it goes smoothly. |
Works like a charm! Would never have realised that you can control EOL characters for particular extensions with |
Thank you for patch-package 🙇 |
Good idea, I'm noting that, as well as adding a contextual error message to point people in the right direction when patch application fails for this reason. |
I've updated the README now to reflect the changes you suggested. Thanks again! Really big improvement! |
Recently I used patch-package (3.4.0) on macOS (which worked very well) but my colleagues on Windows got an error during
npm install
. I followed the documentation, i.e., I setautocrlf=true
on Windows but this did not help.After investigating this issue, I found the following:
patch
(fromgit-bash
)npm install
did not error out, patches were applied)I compared the patches created on macOS with those on Windows and found that they were exactly the same, except that the newly created patches on Windows did NOT have CRLF but LF ending.
Then I removed the
autocrlf
setting and forced LF EOL on patch files via.gitattribute
and then the patches from macOS worked, too.So, I propose to change the documentation, stating that
autocrlf
is not necessary. Instead, create a.gitattributes
file in the patches folder containing at least this:The text was updated successfully, but these errors were encountered: