Skip to content

Commit 3b41ab0

Browse files
committed
Inline
1 parent dc70521 commit 3b41ab0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

crates/uv/src/commands/pip/list.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ pub(crate) fn pip_list(
5353
.collect_vec();
5454

5555
// We force output to stdout specifically for `pip list` command (#8379)
56-
let mut forced_stdout = Stdout::Enabled;
5756
match format {
5857
ListFormat::Json => {
5958
let rows = results.iter().copied().map(Entry::from).collect_vec();
6059
let output = serde_json::to_string(&rows)?;
61-
writeln!(forced_stdout, "{output}")?;
60+
writeln!(Stdout::Enabled, "{output}")?;
6261
}
6362
ListFormat::Columns if results.is_empty() => {}
6463
ListFormat::Columns => {
@@ -99,13 +98,18 @@ pub(crate) fn pip_list(
9998
}
10099

101100
for elems in MultiZip(columns.iter().map(Column::fmt).collect_vec()) {
102-
writeln!(forced_stdout, "{}", elems.join(" ").trim_end())?;
101+
writeln!(Stdout::Enabled, "{}", elems.join(" ").trim_end())?;
103102
}
104103
}
105104
ListFormat::Freeze if results.is_empty() => {}
106105
ListFormat::Freeze => {
107106
for dist in &results {
108-
writeln!(forced_stdout, "{}=={}", dist.name().bold(), dist.version())?;
107+
writeln!(
108+
Stdout::Enabled,
109+
"{}=={}",
110+
dist.name().bold(),
111+
dist.version()
112+
)?;
109113
}
110114
}
111115
}

0 commit comments

Comments
 (0)