Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda backend messing up access rights to base conda env on Windows #372

Closed
Tolker-KU opened this issue Dec 19, 2020 · 0 comments · Fixed by #373
Closed

Conda backend messing up access rights to base conda env on Windows #372

Tolker-KU opened this issue Dec 19, 2020 · 0 comments · Fixed by #373

Comments

@Tolker-KU
Copy link
Contributor

Tolker-KU commented Dec 19, 2020

Describe the bug
When running a session the second time with conda as backend and not reusing the environment, the conda environment created by nox is deleted using shutil. Deleting a conda environment not using conda env remove results in conda going nuclear and messing up all sort of permissions on files on Windows. This includes files in the base conda environment.

I would suggest that a conda environment was deleted using conda env remove before deleting the directory when recreating environments. See https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#removing-an-environment

How to reproduce
Running a simple session two times on Windows causes the problem.

@nox.session(venv_backend="conda")
def reproduce(session):
    session.conda_install("nox")

Expected behavior
The conda environment should be recreated without affecting anything else.

@Tolker-KU Tolker-KU changed the title Conda messing up access rights to base conda env on Windows Conda backend messing up access rights to base conda env on Windows Dec 19, 2020
crwilcox added a commit that referenced this issue Dec 31, 2020
…#373)

Co-authored-by: Santos Gallegos <santos_g@outlook.com>
Co-authored-by: Christopher Wilcox <crwilcox@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants