I'm trying to export environment variables to the calling shell/terminal/cmd in a platform agnostic way using node.
Is this possible?
Of course I can set variables using
FOO="bar"
echo $FOO
The following doesn't work but essentially I am hoping to do the same thing from node:
node -e "process.env.FOO = 'bar'"
echo $FOO
Or perhaps using spawn
or similar?