Module libcoreinst::util
source · Functions
- Runs the provided Command object, captures its stdout, and swallows its stderr except on failure. Returns a Result
describing whether the command failed, and if not, its standard output. Output is assumed to be UTF-8. Errors are adequately prefixed with the full command. - Rust ignores SIGPIPE by default, which causes verbose failures when our output is piped to a program that exits. Unignore SIGPIPE to avoid this. This will give the program no chance to clean up, so is only appropriate for simple reporting/debugging commands.