Skip to content

[BUG] --no-reuse-existing-virtualenvs doesn't seem to work #488

@henryiii

Description

@henryiii

Describe the bug

Adding --no-reuse-existing-virtualenvs does not seem to ignore the cache, and instead just reuses the existing environments anyway. Happened on the previous version, and then did a brew upgrade, and 2021.10.1 also has this problem. Unless I misunderstand this option, pretty sure it's broken.

How to reproduce

@nox.session(reuse_venv=True)
def type(session):
    session.install('mypy')
    session.run('mypy')

(simplified slightly, should be unimportant)

$ nox --no-reuse-existing-virtualenvs -s type
nox > Running session type
nox > Re-using existing virtual environment at .nox/type.

Expected behavior
The existing virtual environment should not have been reused. (It really was, not just visually; I was trying to remove an item from the install list, but it remained installed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions