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

Treat the base Conda environment as a system environment #7691

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Sep 25, 2024

Closes #7124
Closes #7137

@zanieb zanieb added the breaking A breaking change label Sep 25, 2024
@zanieb zanieb marked this pull request as ready for review September 25, 2024 20:58
return Some(PathBuf::from(dir));
/// If `base` is true, the active environment must be the base environment or `None` is returned,
/// and vice-versa.
pub(crate) fn conda_environment_from_env(base: bool) -> Option<PathBuf> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might suggest making this an enum rather than a bool so that it's more self-documenting.

return false;
};

name.to_string_lossy() != default_env
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably do name.to_str().and_then(...), since if it's not UTF-8, it can't match base or root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking change
Projects
None yet
2 participants