@@ -8,7 +8,7 @@ use environment_locations::{
8
8
get_environments,
9
9
} ;
10
10
use environments:: { get_conda_environment_info, CondaEnvironment } ;
11
- use log:: error;
11
+ use log:: { error, info } ;
12
12
use manager:: CondaManager ;
13
13
use pet_core:: {
14
14
env:: PythonEnv ,
@@ -245,16 +245,22 @@ impl Locator for Conda {
245
245
if let Some ( env) = environments. get ( path) {
246
246
return Some ( env. clone ( ) ) ;
247
247
}
248
+ info ! ( "Getting conda env info for {:?}" , path) ;
249
+
248
250
if let Some ( env) = get_conda_environment_info ( path, & None ) {
251
+ info ! ( "Got conda env info for {:?} => {:?}" , path, env) ;
249
252
if let Some ( conda_dir) = & env. conda_dir {
253
+ info ! ( "Got Conda dir and now Getting conda manager for {:?}" , path) ;
250
254
if let Some ( manager) = self . get_manager ( conda_dir) {
255
+ info ! ( "Got conda manager for {:?} => {:?}" , path, manager) ;
251
256
let env = env. to_python_environment (
252
257
Some ( conda_dir. clone ( ) ) ,
253
258
Some ( manager. to_manager ( ) ) ,
254
259
) ;
255
260
environments. insert ( path. clone ( ) , env. clone ( ) ) ;
256
261
return Some ( env) ;
257
262
} else {
263
+ error ! ( "Did not get conda manager for {:?}" , path) ;
258
264
// We will still return the conda env even though we do not have the manager.
259
265
// This might seem incorrect, however the tool is about discovering environments.
260
266
// The client can activate this env either using another conda manager or using the activation scripts
@@ -264,6 +270,7 @@ impl Locator for Conda {
264
270
return Some ( env) ;
265
271
}
266
272
} else {
273
+ error ! ( "Did not get conda dir for {:?}" , path) ;
267
274
// We will still return the conda env even though we do not have the manager.
268
275
// This might seem incorrect, however the tool is about discovering environments.
269
276
// The client can activate this env either using another conda manager or using the activation scripts
@@ -272,6 +279,8 @@ impl Locator for Conda {
272
279
environments. insert ( path. clone ( ) , env. clone ( ) ) ;
273
280
return Some ( env) ;
274
281
}
282
+ } else {
283
+ error ! ( "Did not get conda env info for {:?}" , path) ;
275
284
}
276
285
}
277
286
None
0 commit comments