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

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -