| Crates.io | execute-command |
| lib.rs | execute-command |
| version | 0.3.0 |
| created_at | 2023-04-19 07:51:38.090692+00 |
| updated_at | 2023-04-22 05:56:13.950951+00 |
| description | A simple Rust package that wraps `Command` to simplify the execution of programs. |
| homepage | |
| repository | https://github.com/krazijames/execute-command |
| max_upload_size | |
| id | 843311 |
| size | 13,405 |
A simple Rust package that wraps Command to simplify the execution of programs.
Basic functions:
use execute_command as exec;
let mut command = exec::parse("echo 1").unwrap();
let status = exec::status("echo 1").unwrap();
let output = exec::output("echo 1").unwrap();
let string = exec::string("echo 1").unwrap();
Extending Command:
use execute_command::ExecuteCommand;
use std::process::Command;
let mut command = Command::parse("echo 1").unwrap();
let status = Command::parse("echo 1").unwrap().execute_status().unwrap();
let output = Command::parse("echo 1").unwrap().execute_output().unwrap();
let string = Command::parse("echo 1").unwrap().execute_string().unwrap();
Note that these functions will return an error if the program exits with a non-zero status code.