diff --git a/src/runtime.rs b/src/runtime.rs
index 32907a0..e3a17ad 100644
--- a/src/runtime.rs
+++ b/src/runtime.rs
@@ -7,7 +7,7 @@ use std::env;
use std::fs::{File, OpenOptions};
use std::io::{self, Write};
use std::path::{Path, PathBuf};
-use std::process::{Command, Stdio};
+use std::process::{Child, Command, Stdio};
#[derive(Debug, Clone, Default)]
pub struct RunOptions {}
@@ -106,6 +106,10 @@ impl Shell {
return self.run_command(&pipeline.commands[0], None, capture_stdout);
}
+ if let Some(output) = self.try_run_external_pipeline(pipeline, capture_stdout)? {
+ return Ok(output);
+ }
+
let mut input = None;
let mut status = 0;
let mut stdout = Vec::new();
@@ -129,6 +133,121 @@ impl Shell {
})
}
+ fn try_run_external_pipeline(
+ &self,
+ pipeline: &Pipeline,
+ capture_stdout: bool,
+ ) -> Result