File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
crates/uv/src/commands/pip Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -53,12 +53,11 @@ pub(crate) fn pip_list(
53
53
. collect_vec ( ) ;
54
54
55
55
// We force output to stdout specifically for `pip list` command (#8379)
56
- let mut forced_stdout = Stdout :: Enabled ;
57
56
match format {
58
57
ListFormat :: Json => {
59
58
let rows = results. iter ( ) . copied ( ) . map ( Entry :: from) . collect_vec ( ) ;
60
59
let output = serde_json:: to_string ( & rows) ?;
61
- writeln ! ( forced_stdout , "{output}" ) ?;
60
+ writeln ! ( Stdout :: Enabled , "{output}" ) ?;
62
61
}
63
62
ListFormat :: Columns if results. is_empty ( ) => { }
64
63
ListFormat :: Columns => {
@@ -99,13 +98,18 @@ pub(crate) fn pip_list(
99
98
}
100
99
101
100
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( ) ) ?;
103
102
}
104
103
}
105
104
ListFormat :: Freeze if results. is_empty ( ) => { }
106
105
ListFormat :: Freeze => {
107
106
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
+ ) ?;
109
113
}
110
114
}
111
115
}
You can’t perform that action at this time.
0 commit comments