mirror of
https://github.com/nushell/nushell.git
synced 2024-11-27 02:44:01 +01:00
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