javascript - Unable to use process.env to get environment variable in ~/.profile or ~/.bash_profile in Mac -


i trying environment variables in node.js (using node-webkit) application on mac , unable to.

i added entry

export my_project=\library\mrproject

in both ~/.bash_profile , ~/.profile.

i did source both , when try access process.env.my_project returns undefined. tried access process.env , runs few things doesn't return environment variables exporting in ~/.profile and/or ~/.bash_profile.

you need source ~/.bash_profile when modify profile files. or logout , login make take effect. try replacing process.env.my_project process.env.path test.


Comments

Popular posts from this blog

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -