-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
If patch failed, the process should exit with an error. #159
Comments
+1 For example: |
Definitely +1 on this. Had similar problem as KonstaL |
@ds300 unfortunately this causes a new problem for me when I have a patch for a package in the patch fails due to module not being present, which is expected for me as im trying to install production modules only |
Ah, I'm very sorry about that @Slessi I'm working on a fix! |
Ok @Slessi I pushed a fix to v6.2.0 you probably don't need to do anything except upgrade but read this just in case: https://github.com/ds300/patch-package#dev-only-patches |
Hi, I'm running microservices, all the services shared a "patches" folder.
If file to be patched is not found: Whether the process exits or not, should this be a flag (ie. --fail-on-warning) instead ? |
@Boxonical Thanks for letting me know. The behaviour you're relying on is dangerous, as described above. So I don't want to support it going forward. I'm very sorry for the breaking change :/ The easiest solution for you right now is probably to make separate patch folders for each microservice which copies or symlinks only the required patch files for that service. Let me know if I can be of any more help 🙏 From now on sharing patch files between different projects should be easiest the same way we share node_modules between different projects, i.e. using |
I also would love an option to ignore these errors. I'm doing docker-based yarn workspace microservice deploys where some packages that are patched may not exist. But I've added the ones to be ignored to my |
Right now, if patching a package fails for some reason, for example, if file to be patched is not found, a warning is printed on the terminal and the process continues.
Warning: Patch file found for package **package-name** which is not present at ...
This is potentially dangerous and could break things in an application.
I propose that this is not enough and that the process should be exited and not allowed to complete execution and an error should be clearly indicated.
The text was updated successfully, but these errors were encountered: