patch-package icon indicating copy to clipboard operation
patch-package copied to clipboard

Error does not result in non-zero exit code

Open kumavis opened this issue 5 years ago • 2 comments

$ ./node_modules/patch-package/index.js     
patch-package 6.2.2
Applying patches...
[email protected] ✔
ethereumjs-abi/[email protected] ✔
ethereumjs-tx/[email protected][email protected][email protected] ✔
Error: Patch file found for package keccak which is not present at node_modules/web3-provider-engine/node_modules/keccak

results in exit code zero

this should report a non-zero exit code

related https://github.com/ds300/patch-package/issues/210

kumavis avatar May 28 '20 06:05 kumavis

looks like it is intentional https://github.com/ds300/patch-package/issues/86 workaround is NODE_ENV=test

kumavis avatar May 28 '20 06:05 kumavis

Unbelievable, that ignoring an error is actually intended - I've just struggled with strange errors in a project, because I wasn't aware of a patch not being applied.

If yarn leaves the working directory in an inconsistent state after postinstall script failure, it's yarn's issue.

codepainters avatar Jul 19 '24 19:07 codepainters

I understand why running this local ends in a zero exit code, but is there anything we can do so it outputs to the yarn install log?

joeyparis avatar Jul 21 '25 21:07 joeyparis