Skip to content

Commit

Permalink
make patch package not error if error-on-fail false
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 81c616448486179021f604e9ce11f3bd1be59b26
  • Loading branch information
f authored and actions-user committed Sep 19, 2024
1 parent 94fff27 commit b8f3aa5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Binary file modified bun.lockb
Binary file not shown.
25 changes: 25 additions & 0 deletions patches/patch-package+8.0.0.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
diff --git a/node_modules/patch-package/dist/index.js b/node_modules/patch-package/dist/index.js
index 5642bbd..0ac8e05 100755
--- a/node_modules/patch-package/dist/index.js
+++ b/node_modules/patch-package/dist/index.js
@@ -88,10 +88,16 @@ else {
const reverse = !!argv["reverse"];
// don't want to exit(1) on postinstall locally.
// see https://github.com/ds300/patch-package/issues/86
- const shouldExitWithError = !!argv["error-on-fail"] ||
- (process_1.default.env.NODE_ENV === "production" && ci_info_1.isCI) ||
- (ci_info_1.isCI && !process_1.default.env.PATCH_PACKAGE_INTEGRATION_TEST) ||
- process_1.default.env.NODE_ENV === "test";
+
+ let shouldExitWithError = !!argv["error-on-fail"] ||
+ (process_1.default.env.NODE_ENV === "production" && ci_info_1.isCI) ||
+ (ci_info_1.isCI && !process_1.default.env.PATCH_PACKAGE_INTEGRATION_TEST) ||
+ process_1.default.env.NODE_ENV === "test";
+ // Don't error when flag is false
+ if (!argv["error-on-fail"]) {
+ shouldExitWithError = false;
+ }
+
const shouldExitWithWarning = !!argv["error-on-warn"];
applyPatches_1.applyPatchesForApp({
appPath,
diff --git a/node_modules/patch-package/dist/makePatch.js b/node_modules/patch-package/dist/makePatch.js
index d8d0925..874284a 100644
--- a/node_modules/patch-package/dist/makePatch.js
Expand Down

0 comments on commit b8f3aa5

Please sign in to comment.