Skip to content

Unexpected (buggy?) environment passing #253

@sambarluc

Description

@sambarluc

Describe the bug
When I do session.run("stuff", env={}), I would expect to run the command in an environment where no variable is defined, however a copy of the local environment is made. Similarly, if I do session.run("stuff", env={"CREEPY": "TRUE"}) I would expect to run in an environment where only $CREEPY is defined, while this only updates the copy of the current environment.

How to reproduce
Check the environment when running with env={}.

Expected behavior
If I pass env={}, I would expect to work in a clean environment. At the moment, the workaround is to do for instance session.virtualenv.env = {"SYSTEMROOT": os.getenv("SYSTEMROOT", "")} at the beginning of each session, but I find that a bit too cumbersome.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions