diff --git a/stdlib/src/notification.rs b/stdlib/src/notification.rs index a29dde0b..8db24c7a 100644 --- a/stdlib/src/notification.rs +++ b/stdlib/src/notification.rs @@ -34,13 +34,11 @@ impl StdlibRegistry { { use std::process::Command; let _ = Command::new("powershell") + .env("TS_NOTIFY_TITLE", &title) + .env("TS_NOTIFY_BODY", &body) .args([ "-Command", - &format!( - "[System.Windows.MessageBox]::Show('{}','{}')", - body.replace("'", "''"), - title.replace("'", "''") - ), + "[System.Windows.MessageBox]::Show($env:TS_NOTIFY_BODY, $env:TS_NOTIFY_TITLE)" ]) .spawn(); }