Skip to main content

spawn_editor

Function spawn_editor 

Source
pub fn spawn_editor(
    argv: &[OsString],
    extras: &[OsString],
    tempfile_path: &Path,
    tty: Option<TtyHandles>,
) -> Result<ExitStatus, Error>
Expand description

Spawn the editor with the resolved argv + extras + tempfile path appended.

tty is the result of tty::open_controlling_tty() — if None, the caller has chosen the test bypass path (RUSTY_VIPE_TEST_BYPASS_TTY=1) and we’ll feed the editor null stdin/stdout.

On spawn ErrorKind::NotFound, returns Error::EditorNotFound(argv[0]) per FR-016.