only-allow icon indicating copy to clipboard operation
only-allow copied to clipboard

fix: abort PM enforcement if the script runs in a dependency

Open neolitec opened this issue 1 year ago • 4 comments

The reason why is that NPM runs the preinstall script from the cache instead of from node_modules.

One way to detect that is by testing the presence of the _cacache which is the folder NPM uses for its cache.

Closes #13

neolitec avatar Nov 23 '22 06:11 neolitec