Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/cli/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,7 @@ pub(crate) fn list_components(

pub(crate) fn list_installed_components(distributable: DistributableToolchain<'_>) -> Result<()> {
let t = process().stdout();
let manifestation = distributable.get_manifestation()?;
let config = manifestation.read_config()?.unwrap_or_default();
let manifest = distributable.get_manifest()?;
let components = manifest.query_components(distributable.desc(), &config)?;

for component in components {
for component in distributable.components()? {
if component.installed {
writeln!(t.lock(), "{}", component.name)?;
}
Expand Down
7 changes: 7 additions & 0 deletions src/toolchain/distributable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ impl<'a> DistributableToolchain<'a> {
Ok(())
}

pub(crate) fn components(&self) -> anyhow::Result<Vec<crate::dist::manifest::ComponentStatus>> {
let manifestation = self.get_manifestation()?;
let config = manifestation.read_config()?.unwrap_or_default();
let manifest = self.get_manifest()?;
manifest.query_components(self.desc(), &config)
}

/// Are all the components installed in this distribution
pub(crate) fn components_exist(
&self,
Expand Down