diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs index 7fe0a959..1e29f96d 100644 --- a/lib/core/libimagrt/src/runtime.rs +++ b/lib/core/libimagrt/src/runtime.rs @@ -467,11 +467,17 @@ impl<'a> Runtime<'a> { }) .or(env::var("EDITOR").ok()) .map(|s| {debug!("Editing with '{}'", s); s}) - .map(|s| { - let mut c = Command::new(s); - c.stdin(::std::process::Stdio::inherit()); + .and_then(|s| { + let mut split = s.split(" "); + let command = split.next(); + if command.is_none() { + return None + } + let mut c = Command::new(command.unwrap()); // secured above + c.args(split); + c.stdin(::std::process::Stdio::null()); c.stderr(::std::process::Stdio::inherit()); - c + Some(c) }) }