How to set environment variables for bash from within powershell? How to set environment variables for bash from within powershell? powershell powershell

How to set environment variables for bash from within powershell?


For context, this is a solution, but it's using standard bash on Ubuntu:

export ApiKey="57647625454354365"

to check if ApiKey is set correctly do:

echo $ApiKey

https://askubuntu.com/a/1205233/45156

But still looking to accomplish this with powershell:

https://askubuntu.com/q/1205227/45156

Because while I can run pwsh twitter.ps1, and powershell will correctly pick up the env variables, visual studio code fails to do so. See also:

https://code.visualstudio.com/docs/editor/variables-reference