AndersDJohnson / use-yarn

Force users to use yarn instead of npm.
https://andersdjohnson.github.io/use-yarn/
ISC License
50 stars 12 forks source link

fix: support npx again with stdin #16

Closed AndersDJohnson closed 2 years ago

AndersDJohnson commented 2 years ago

Hopefully addresses https://github.com/AndersDJohnson/use-yarn/issues/15.

Those using npx use-yarn will want to update their preinstall scripts as follows:

-  "preinstall": "npx use-yarn"
+  "preinstall": "echo $npm_execpath | npx use-yarn"

The change is intended to be backwards compatible.

AndersDJohnson commented 2 years ago

Followed up in https://github.com/AndersDJohnson/use-yarn/commit/cbec3f35ae723a96d615d31178052a2499b754fa to support passing as a simpler command argument instead of standard input.