xonsh / xontrib-vox

Python virtual environment manager for xonsh.
MIT License
15 stars 3 forks source link

vox doesn't expand ~ for $VIRTUALENV_HOME #2

Open jaraco opened 2 years ago

jaraco commented 2 years ago

Setting $VIRTUALENV_HOME to ~/.local/envs causes environments to be created in ~/\~/.local/envs (e.g. /Users/username/~/.local/envs). It would be nice if one didn't have to call os.expanduser when setting the environment variable.

gforsyth commented 2 years ago

I'd wager this is the culprit if anyone wants to take a crack at it: https://github.com/xonsh/xonsh/blob/c01fc6efe37bbd314779e62f80f9de598b9680bc/xontrib/voxapi.py#L132-L133

anki-code commented 2 years ago

Hi @yaxollum! Thanks for the fix in xonsh/xonsh#4713! Could you please take a look into this similar issue?

yaxollum commented 2 years ago

Hi @anki-code! This does look like a very similar issue (something like expand_path(XSH.env["VIRTUALENV_HOME"]) would probably fix it), but I'm not familiar with Python virtual environments, so it would be nice if someone experienced with virtual environments could fix this and test it out.