mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 00:44:57 +02:00
avoid freeze when capturing external stderr (#6700)
* avoid freeze when capturing external stderr * try replace from sh to bash * change description * fmt code
This commit is contained in:
@ -433,10 +433,14 @@ impl PipelineData {
|
||||
|
||||
if let PipelineData::ExternalStream {
|
||||
stdout: stream,
|
||||
stderr: stderr_stream,
|
||||
exit_code,
|
||||
..
|
||||
} = self
|
||||
{
|
||||
// NOTE: currently we don't need anything from stderr
|
||||
// so directly consumes `stderr_stream` to make sure that everything is done.
|
||||
let _ = stderr_stream.map(|x| x.into_bytes());
|
||||
if let Some(stream) = stream {
|
||||
for s in stream {
|
||||
let s_live = s?;
|
||||
|
Reference in New Issue
Block a user