mirror of
https://github.com/nushell/nushell.git
synced 2024-12-22 23:23:12 +01:00
Merge pull request #664 from jonathandturner/detach_externals
Detach externals so they don't freeze while buffering
This commit is contained in:
commit
52e71cad18
@ -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