Skip to main content

notify

Function notify 

Source
pub async fn notify(cmd: &Notify, q: &Question) -> Result<()>
Expand description

Run the operator’s notification command, if one is configured.

The command is argv, never a shell string, and the substitutions below are a single pass over each argument: a summary containing ; rm -rf ~ is one argument to one program, and a summary containing the characters {run} is not re-expanded. That property is the reason agent-authored text can be put in a notification at all.

An error here is reported, not swallowed, so magi notify --test can show the operator why nothing arrives. The waiting path logs it and carries on.