Skip to main content

with_stdin_support

Function with_stdin_support 

Source
pub fn with_stdin_support<F>(file: &Path, f: F) -> Result<(), CliError>
where F: FnOnce(&Path) -> Result<(), CliError>,
Expand description

Run a command with stdin pipe support: if file is -, buffer stdin to a tempfile; otherwise pass the path through.