execute_void_nopanic

Function execute_void_nopanic 

Source
pub fn execute_void_nopanic<TArg, TEnvKey, TEnvVal>(
    cmd: impl AsRef<OsStr>,
    args: impl IntoIterator<Item = TArg>,
    envs: impl IntoIterator<Item = (TEnvKey, TEnvVal)>,
)
where TArg: AsRef<OsStr>, TEnvKey: AsRef<OsStr>, TEnvVal: AsRef<OsStr>,
Expand description

Executes command with args and environment variables, ignores output

  • On invalid command: do nothing
  • On error exit code: do nothing
  • On parsing failure: N/A
  • Possible errors: N/A

Designed for

use shellfn::shell;

#[shell(no_panic)]
fn command() {
    "echo Hello, world"
}

command()