Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
yarn run --production foo sets NODE_ENV=production.
yarn run foo --production doesn't set NODE_ENV.
npm run foo --production does set NODE_ENV.
(verified with npm 5.6.0)
If the current behavior is a bug, please provide the steps to reproduce.
console.log(process.env.NODE_ENV) inside a script executed with 'run'.
What is the expected behavior?
--production should always set NODE_ENV.
Please mention your node.js, yarn and operating system version.
OS X 10.13.3, v8.9.4