@@ -174,8 +174,7 @@ impl CondaLocator for Conda {
174174 if environments. contains_key ( & conda_env. prefix ) {
175175 continue ;
176176 }
177- let env = conda_env
178- . to_python_environment ( Some ( conda_dir. clone ( ) ) , Some ( manager. to_manager ( ) ) ) ;
177+ let env = conda_env. to_python_environment ( Some ( manager. to_manager ( ) ) ) ;
179178 environments. insert ( conda_env. prefix . clone ( ) , env. clone ( ) ) ;
180179 reporter. report_manager ( & manager. to_manager ( ) ) ;
181180 reporter. report_environment ( & env) ;
@@ -248,18 +247,15 @@ impl Locator for Conda {
248247 if let Some ( env) = get_conda_environment_info ( path, & None ) {
249248 if let Some ( conda_dir) = & env. conda_dir {
250249 if let Some ( manager) = self . get_manager ( conda_dir) {
251- let env = env. to_python_environment (
252- Some ( conda_dir. clone ( ) ) ,
253- Some ( manager. to_manager ( ) ) ,
254- ) ;
250+ let env = env. to_python_environment ( Some ( manager. to_manager ( ) ) ) ;
255251 environments. insert ( path. clone ( ) , env. clone ( ) ) ;
256252 return Some ( env) ;
257253 } else {
258254 // We will still return the conda env even though we do not have the manager.
259255 // This might seem incorrect, however the tool is about discovering environments.
260256 // The client can activate this env either using another conda manager or using the activation scripts
261257 error ! ( "Unable to find Conda Manager for env (even though we have a conda_dir): {:?}" , env) ;
262- let env = env. to_python_environment ( Some ( conda_dir . clone ( ) ) , None ) ;
258+ let env = env. to_python_environment ( None ) ;
263259 environments. insert ( path. clone ( ) , env. clone ( ) ) ;
264260 return Some ( env) ;
265261 }
@@ -268,7 +264,7 @@ impl Locator for Conda {
268264 // This might seem incorrect, however the tool is about discovering environments.
269265 // The client can activate this env either using another conda manager or using the activation scripts
270266 error ! ( "Unable to find Conda Manager for env: {:?}" , env) ;
271- let env = env. to_python_environment ( None , None ) ;
267+ let env = env. to_python_environment ( None ) ;
272268 environments. insert ( path. clone ( ) , env. clone ( ) ) ;
273269 return Some ( env) ;
274270 }
@@ -301,7 +297,7 @@ impl Locator for Conda {
301297 // The client can activate this env either using another conda manager or using the activation scripts
302298 error ! ( "Unable to find Conda Manager for the Conda env: {:?}" , env) ;
303299 let prefix = env. prefix . clone ( ) ;
304- let env = env. to_python_environment ( None , None ) ;
300+ let env = env. to_python_environment ( None ) ;
305301 let mut environments = self . environments . lock ( ) . unwrap ( ) ;
306302 environments. insert ( prefix, env. clone ( ) ) ;
307303 reporter. report_environment ( & env) ;
@@ -340,7 +336,6 @@ impl Locator for Conda {
340336 // 5. Report this env.
341337 if let Some ( manager) = manager {
342338 let env = env. to_python_environment (
343- manager. conda_dir . clone ( ) ,
344339 Some ( manager. to_manager ( ) ) ,
345340 ) ;
346341 let mut environments = self . environments . lock ( ) . unwrap ( ) ;
@@ -352,7 +347,7 @@ impl Locator for Conda {
352347 // This might seem incorrect, however the tool is about discovering environments.
353348 // The client can activate this env either using another conda manager or using the activation scripts
354349 error ! ( "Unable to find Conda Manager for Conda env (even though we have a conda_dir {:?}): Env Details = {:?}" , conda_dir, env) ;
355- let env = env. to_python_environment ( Some ( conda_dir . clone ( ) ) , None ) ;
350+ let env = env. to_python_environment ( None ) ;
356351 let mut environments = self . environments . lock ( ) . unwrap ( ) ;
357352 environments. insert ( prefix. clone ( ) , env. clone ( ) ) ;
358353 reporter. report_environment ( & env) ;
0 commit comments