macro_rules! run_command {
($cmd:expr) => { ... };
}
Expand description
Runs a system command and exits with code 1 if an error occurs.
§Arguments
$cmd
- The command to run in the current working directory. The command can be represented as a single string or a collection of strings, or as any other type that implements thecrate::AsCommand
trait.
§Example
use easy_cmd::run_command;
// Run a command in the current working directory.
run_command!("git status");
// The command can also be provided as a collection of strings.
run_command!(&["git", "status"]);