pub fn execute_parse_panic<T, TArg, TEnvKey, TEnvVal>(
cmd: impl AsRef<OsStr>,
args: impl IntoIterator<Item = TArg>,
envs: impl IntoIterator<Item = (TEnvKey, TEnvVal)>,
) -> T
Expand description
Executes command with args and environment variables, parses output
- On invalid command: panic
- On error exit code: panic
- On parsing failure: panic
- Possible errors: N/A
Designed for
use shellfn::shell;
#[shell]
fn command() -> u32 {
"echo -n 42"
}
assert_eq!(42, command())