Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
USERPROFILE is not automatically forwarded on Windows #518
Given the following
[tox] skipsdist = true [testenv] commands = python -c 'import os.path; print(os.path.expanduser("~"))'
Then, on Windows, this will incorrectly print
If you add a
[tox] skipsdist = true [testenv] passenv = USERPROFILE commands = python -c 'import os.path; print(os.path.expanduser("~"))'
If I'm not mistaken, I believe
I'll gladly work on a patch if you're willing to accept such a contribution!
IIRC, Tox 1.x used to forward the entire environment by default, but this created issues with reproducing builds (env-dependent builds are really annoying). Then, Tox 2.0 changed this to forward as few things as possible. I remember the port from Tox 1.9 to 2.0+ because I debugged a lot of these hidden dependencies on environment variables (see PR #520 for another example).
It makes sense from a testing standpoint, but (in addition to testing) I've been using Tox more and more as a one-liner for "find Python, install deps without affecting the system and run this command"-style automation. In that context, having random stdlib stuff breaking for obscure reasons is less fun :-/