toolchains: Expose raw JSON representation of a toolchain (#20721)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz authored and GitHub committed 2024-11-21 13:27:25 +01:00
1 parent 6ab4b46984
commit 75c545aa1e
5 files changed
+38 -19

No files matched your search

+2 -1
View File
@@ -591,8 +591,9 @@ impl ToolchainLister for PythonToolchainProvider {
.into();
Some(Toolchain {
name,
path: toolchain.executable?.to_str()?.to_owned().into(),
path: toolchain.executable.as_ref()?.to_str()?.to_owned().into(),
language_name: LanguageName::new("Python"),
as_json: serde_json::to_value(toolchain).ok()?,
})
})
.collect();