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

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -