-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
Patch cannot be applied when it simultaneously renames and modifies the file #518
Comments
+1 to this - I noticed the same with --partial |
I ran into this, and it seems to work fine in v7.0.0 |
I also had the same problem with v8.0.0. I tried to patch |
This can technically be fixed by adding the patch-package/src/makePatch.ts Lines 314 to 321 in c7c63bf
(This is how i created my succeeding patch file btw) Is there any benefit in keeping "renames", e.g. performance? Or could we simply add this option to fix this bug? |
For issues to do with makePatch -> this solution worked for me. It's been a problem since 2021 |
Description
Patches are successfully applied when they either only modify a specific file or change its name, but fail when doing both at the same time.
Steps to reproduce
patch-package
version: 8.0.0react-native-wiejskie-ziemniaczki
)README.md
tonot-readme.txt
and addA
letter at the end of the file)node_modules
Interestingly, the patch is applied correctly when running
npx patch-package --partial
Here is the patch file that generated error for me:
Workaround
Splitting the patch into two parts seems to be working well, i.e.: one patch just to rename the file and the other to modify the content.
The text was updated successfully, but these errors were encountered: