@@ -18,12 +18,14 @@ pub struct StdioReporter {
1818 print_list : bool ,
1919 managers : Arc < Mutex < HashMap < EnvManagerType , u16 > > > ,
2020 environments : Arc < Mutex < HashMap < Option < PythonEnvironmentKind > , u16 > > > ,
21+ environment_paths : Arc < Mutex < HashMap < Option < PythonEnvironmentKind > , Vec < PythonEnvironment > > > > ,
2122 kind : Option < PythonEnvironmentKind > ,
2223}
2324
2425pub struct Summary {
2526 pub managers : HashMap < EnvManagerType , u16 > ,
2627 pub environments : HashMap < Option < PythonEnvironmentKind > , u16 > ,
28+ pub environment_paths : HashMap < Option < PythonEnvironmentKind > , Vec < PythonEnvironment > > ,
2729}
2830
2931impl StdioReporter {
@@ -33,9 +35,14 @@ impl StdioReporter {
3335 . environments
3436 . lock ( )
3537 . expect ( "environments mutex poisoned" ) ;
38+ let environment_paths = self
39+ . environment_paths
40+ . lock ( )
41+ . expect ( "environment_paths mutex poisoned" ) ;
3642 Summary {
3743 managers : managers. clone ( ) ,
3844 environments : environments. clone ( ) ,
45+ environment_paths : environment_paths. clone ( ) ,
3946 }
4047 }
4148}
@@ -62,6 +69,15 @@ impl Reporter for StdioReporter {
6269 . expect ( "environments mutex poisoned" ) ;
6370 let count = environments. get ( & env. kind ) . unwrap_or ( & 0 ) + 1 ;
6471 environments. insert ( env. kind , count) ;
72+
73+ // Store the environment details for verbose reporting
74+ let mut environment_paths = self
75+ . environment_paths
76+ . lock ( )
77+ . expect ( "environment_paths mutex poisoned" ) ;
78+ let paths = environment_paths. entry ( env. kind ) . or_insert_with ( Vec :: new) ;
79+ paths. push ( env. clone ( ) ) ;
80+
6581 if self . print_list {
6682 println ! ( "{env}" )
6783 }
@@ -73,6 +89,7 @@ pub fn create_reporter(print_list: bool, kind: Option<PythonEnvironmentKind>) ->
7389 print_list,
7490 managers : Arc :: new ( Mutex :: new ( HashMap :: new ( ) ) ) ,
7591 environments : Arc :: new ( Mutex :: new ( HashMap :: new ( ) ) ) ,
92+ environment_paths : Arc :: new ( Mutex :: new ( HashMap :: new ( ) ) ) ,
7693 kind,
7794 }
7895}
0 commit comments