pub fn execute_void_result<TArg, TEnvKey, TEnvVal, TError>(
cmd: impl AsRef<OsStr>,
args: impl IntoIterator<Item = TArg>,
envs: impl IntoIterator<Item = (TEnvKey, TEnvVal)>,
) -> Result<(), TError>Expand description
Executes command with args and environment variables, ignores output
- On invalid command: return error
- On error exit code: return error
- On parsing failure: N/A
- Possible errors: ProcessNotSpawned, WaitFailed, ProcessFailed (stdout and stderr always empty)
Designed for
use shellfn::shell;
#[shell]
fn command() -> Result<(), Box<Error>> {
sleep 5
}
command()