File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -448,12 +448,7 @@ pub(crate) fn list_components(
448448
449449pub ( crate ) fn list_installed_components ( distributable : DistributableToolchain < ' _ > ) -> Result < ( ) > {
450450 let t = process ( ) . stdout ( ) ;
451- let manifestation = distributable. get_manifestation ( ) ?;
452- let config = manifestation. read_config ( ) ?. unwrap_or_default ( ) ;
453- let manifest = distributable. get_manifest ( ) ?;
454- let components = manifest. query_components ( distributable. desc ( ) , & config) ?;
455-
456- for component in components {
451+ for component in distributable. components ( ) ? {
457452 if component. installed {
458453 writeln ! ( t. lock( ) , "{}" , component. name) ?;
459454 }
Original file line number Diff line number Diff line change @@ -115,6 +115,14 @@ impl<'a> DistributableToolchain<'a> {
115115 Ok ( ( ) )
116116 }
117117
118+ pub ( crate ) fn components ( & self ) -> anyhow:: Result < Vec < crate :: dist:: manifest:: ComponentStatus > > {
119+ let manifestation = self . get_manifestation ( ) ?;
120+ let config = manifestation. read_config ( ) ?. unwrap_or_default ( ) ;
121+ let manifest = self . get_manifest ( ) ?;
122+ let components = manifest. query_components ( self . desc ( ) , & config) ?;
123+ Ok ( components)
124+ }
125+
118126 /// Are all the components installed in this distribution
119127 pub ( crate ) fn components_exist (
120128 & self ,
You can’t perform that action at this time.
0 commit comments