only-allow
only-allow copied to clipboard
fix: abort PM enforcement if the script runs in a dependency
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