Skip to content

Commit 16fcef2

Browse files
epagerami3l
authored andcommitted
fix(toolchain): Have 'list' match 'show's styling
`rustup show` and `rustup toolchain list` have similar lists but the latter was unstyled. This updates it to be styled to match `rustup show` as of #4556. Maybe there would be a way to single source this in the future. They do handle paths differently, so it would likely require a larger conversation.
1 parent 670b729 commit 16fcef2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/cli/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::{cmp, env};
99

1010
use anstyle::Style;
1111
use anyhow::{Context, Result, anyhow};
12-
use clap_cargo::style::{ERROR, UPDATE_ADDED, UPDATE_UNCHANGED, UPDATE_UPGRADED};
12+
use clap_cargo::style::{CONTEXT, ERROR, UPDATE_ADDED, UPDATE_UNCHANGED, UPDATE_UPGRADED};
1313
use git_testament::{git_testament, render_testament};
1414
use tracing::{error, info, warn};
1515
use tracing_subscriber::{EnvFilter, Registry, reload::Handle};
@@ -328,7 +328,7 @@ pub(crate) async fn list_toolchains(
328328

329329
writeln!(
330330
cfg.process.stdout().lock(),
331-
"{toolchain}{status_str}{toolchain_path}",
331+
"{toolchain}{CONTEXT}{status_str}{CONTEXT:#}{toolchain_path}",
332332
)?;
333333
Ok(())
334334
}

tests/suite/cli_rustup_ui/rustup_toolchain_list.stdout.term.svg

Lines changed: 3 additions & 1 deletion
Loading

0 commit comments

Comments
 (0)