forked from extern/nushell
Detach externals so they don't freeze while buffering
This commit is contained in:
parent
da31eac735
commit
9382a7e64a
@ -307,10 +307,12 @@ impl ExternalCommand {
|
|||||||
Ok(ClassifiedInputStream::new())
|
Ok(ClassifiedInputStream::new())
|
||||||
}
|
}
|
||||||
StreamNext::External => {
|
StreamNext::External => {
|
||||||
|
let _ = popen.detach();
|
||||||
let stdout = popen.stdout.take().unwrap();
|
let stdout = popen.stdout.take().unwrap();
|
||||||
Ok(ClassifiedInputStream::from_stdout(stdout))
|
Ok(ClassifiedInputStream::from_stdout(stdout))
|
||||||
}
|
}
|
||||||
StreamNext::Internal => {
|
StreamNext::Internal => {
|
||||||
|
let _ = popen.detach();
|
||||||
let stdout = popen.stdout.take().unwrap();
|
let stdout = popen.stdout.take().unwrap();
|
||||||
let file = futures::io::AllowStdIo::new(stdout);
|
let file = futures::io::AllowStdIo::new(stdout);
|
||||||
let stream = Framed::new(file, LinesCodec {});
|
let stream = Framed::new(file, LinesCodec {});
|
||||||
|
Loading…
Reference in New Issue
Block a user