Skip to content

Commit 4e64366

Browse files
authored
use -q when gathering the installed toolchains (#1647)
resolves #1645
2 parents f0ec688 + 2946015 commit 4e64366

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

.changes/1647.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"description": "use `-q` when gathering the installed toolchains",
3+
"issues": [1645],
4+
"type": "fixed"
5+
}
File renamed without changes.

src/rustup.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,10 @@ pub fn active_toolchain(msg_info: &mut MessageInfo) -> Result<String> {
8585

8686
pub fn installed_toolchains(msg_info: &mut MessageInfo) -> Result<Vec<String>> {
8787
let out = rustup_command(msg_info, true)
88-
.args(["toolchain", "list"])
88+
.args(["--quiet", "toolchain", "list"])
8989
.run_and_get_stdout(msg_info)?;
9090

91-
Ok(out
92-
.lines()
93-
.map(|l| {
94-
l.replace(" (default)", "")
95-
.replace(" (override)", "")
96-
.trim()
97-
.to_owned()
98-
})
99-
.collect())
91+
Ok(out.lines().map(|l| l.trim().to_owned()).collect())
10092
}
10193

10294
pub fn available_targets(

0 commit comments

Comments
 (0)