Skip to content

USERPROFILE is not automatically forwarded on Windows #518

Closed
@AndreLouisCaron

Description

@AndreLouisCaron

Hi there!

Given the following tox.ini:

[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 passenv section to forward USERPROFILE, then it gives the right output:

[tox]
skipsdist = true

[testenv]
passenv =
  USERPROFILE
commands =
  python -c 'import os.path; print(os.path.expanduser("~"))'

This prints C:\Users\... as you would expect.

If I'm not mistaken, I believe HOME is forwarded by default on other systems, I would assume USERPROFILE should also be forwarded by default on Windows.

I'll gladly work on a patch if you're willing to accept such a contribution!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions