asdf-community / asdf-python

Python plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
643 stars 55 forks source link

asdf python shell unable to fetch environment variables #161

Open codingCoffee opened 1 year ago

codingCoffee commented 1 year ago

python scripts are unable to pick up environment variables. I'm not sure if this is expected or a bug. But wanted to know if there is a way to work around this?

➜ echo $MY_VAR
/Users/cc/.pkb/personal/Books.org

➜ which python
/Users/cc/.asdf/shims/python

➜ python
Python 3.11.3 (main, May  8 2023, 20:50:37) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from os import environ
>>> environ.get('MY_VAR')
>>>