mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
Detach externals so they don't freeze while buffering
This commit is contained in:
parent
da31eac735
commit
9382a7e64a
1 changed files with 2 additions and 0 deletions
|
@ -307,10 +307,12 @@ impl ExternalCommand {
|
|||
Ok(ClassifiedInputStream::new())
|
||||
}
|
||||
StreamNext::External => {
|
||||
let _ = popen.detach();
|
||||
let stdout = popen.stdout.take().unwrap();
|
||||
Ok(ClassifiedInputStream::from_stdout(stdout))
|
||||
}
|
||||
StreamNext::Internal => {
|
||||
let _ = popen.detach();
|
||||
let stdout = popen.stdout.take().unwrap();
|
||||
let file = futures::io::AllowStdIo::new(stdout);
|
||||
let stream = Framed::new(file, LinesCodec {});
|
||||
|
|
Loading…
Reference in a new issue