Skip to content

Commit 1744129

Browse files
committed
oops
1 parent bbcb06c commit 1744129

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

crates/pet/src/locators.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ use pet_virtualenvwrapper::VirtualEnvWrapper;
2323
use std::path::PathBuf;
2424
use std::sync::Arc;
2525

26+
use crate::resolve;
27+
2628
pub fn create_locators(conda_locator: Arc<Conda>) -> Arc<Vec<Arc<dyn Locator>>> {
2729
// NOTE: The order of the items matter.
2830
let environment = EnvironmentApi::new();
@@ -119,7 +121,16 @@ pub fn identify_python_environment_using_locators(
119121
let mut fallback_category = None;
120122

121123
// If one of the symlinks are in the PATH variable, then we can treat this as a GlobalPath category.
122-
for symlink in resolved_env.symlink.clone().unwrap_or_default().into_iter() {
124+
println!(
125+
"DETERMINE CATEGORY for {:?} with {:?}",
126+
resolved_env, global_env_search_paths
127+
);
128+
let symlinks = [
129+
resolved_env.symlink.clone().unwrap_or_default(),
130+
vec![resolved_env.executable.clone(), executable.clone()],
131+
]
132+
.concat();
133+
for symlink in symlinks {
123134
if let Some(bin) = symlink.parent() {
124135
if global_env_search_paths.contains(&bin.to_path_buf()) {
125136
fallback_category = Some(PythonEnvironmentCategory::GlobalPaths);

0 commit comments

Comments
 (0)