Skip to content

Commit 656dd38

Browse files
committed
Updates
1 parent 8b8e13c commit 656dd38

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

crates/pet-conda/src/environments.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,10 @@ pub fn get_conda_environment_info(
7272
// Not a conda environment (neither root nor a separate env).
7373
return None;
7474
}
75-
// If we know the conda install folder, then we can use it.
76-
let mut conda_install_folder = manager
77-
.clone()
78-
.and_then(|m| m.conda_dir)
79-
.or_else(|| get_conda_installation_used_to_create_conda_env(env_path));
75+
// Even if we have the conda manager, always fid the conda manager based on the env.
76+
// & then use the given conda manager as a fallback.
77+
let mut conda_install_folder = get_conda_installation_used_to_create_conda_env(env_path)
78+
.or_else(|| manager.clone().and_then(|m| m.conda_dir));
8079

8180
if let Some(conda_dir) = &conda_install_folder {
8281
if conda_dir.exists() {

0 commit comments

Comments
 (0)