@@ -8,7 +8,7 @@ use environment_locations::{
88 get_environments,
99} ;
1010use environments:: { get_conda_environment_info, CondaEnvironment } ;
11- use log:: error;
11+ use log:: { error, info } ;
1212use manager:: CondaManager ;
1313use pet_core:: {
1414 env:: PythonEnv ,
@@ -245,16 +245,22 @@ impl Locator for Conda {
245245 if let Some ( env) = environments. get ( path) {
246246 return Some ( env. clone ( ) ) ;
247247 }
248+ info ! ( "Getting conda env info for {:?}" , path) ;
249+
248250 if let Some ( env) = get_conda_environment_info ( path, & None ) {
251+ info ! ( "Got conda env info for {:?} => {:?}" , path, env) ;
249252 if let Some ( conda_dir) = & env. conda_dir {
253+ info ! ( "Got Conda dir and now Getting conda manager for {:?}" , path) ;
250254 if let Some ( manager) = self . get_manager ( conda_dir) {
255+ info ! ( "Got conda manager for {:?} => {:?}" , path, manager) ;
251256 let env = env. to_python_environment (
252257 Some ( conda_dir. clone ( ) ) ,
253258 Some ( manager. to_manager ( ) ) ,
254259 ) ;
255260 environments. insert ( path. clone ( ) , env. clone ( ) ) ;
256261 return Some ( env) ;
257262 } else {
263+ error ! ( "Did not get conda manager for {:?}" , path) ;
258264 // We will still return the conda env even though we do not have the manager.
259265 // This might seem incorrect, however the tool is about discovering environments.
260266 // The client can activate this env either using another conda manager or using the activation scripts
@@ -264,6 +270,7 @@ impl Locator for Conda {
264270 return Some ( env) ;
265271 }
266272 } else {
273+ error ! ( "Did not get conda dir for {:?}" , path) ;
267274 // We will still return the conda env even though we do not have the manager.
268275 // This might seem incorrect, however the tool is about discovering environments.
269276 // The client can activate this env either using another conda manager or using the activation scripts
@@ -272,6 +279,8 @@ impl Locator for Conda {
272279 environments. insert ( path. clone ( ) , env. clone ( ) ) ;
273280 return Some ( env) ;
274281 }
282+ } else {
283+ error ! ( "Did not get conda env info for {:?}" , path) ;
275284 }
276285 }
277286 None
0 commit comments