javascript - Node start script env not being set on Mac -


i have following seems work on windows (and linux far can tell):

package.json:

"scripts": {     "test": "node_env=test || set \"node_env=test\"&& mocha **/*.test.js --reporter spec" } 

but doesn't work on osx reason, tried doing node_env=test doesn't work either, thoughts?

you need add export before variable name, set in windows:

"scripts": {     "test": "export node_env=test || set \"node_env=test\" && mocha **/*.test.js --reporter spec" } 

Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -