diff --git a/stdlib/src/notification.rs b/stdlib/src/notification.rs index a29dde0b..e7e033a9 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_BODY", &body) + .env("__TS_TITLE", &title) .args([ "-Command", - &format!( - "[System.Windows.MessageBox]::Show('{}','{}')", - body.replace("'", "''"), - title.replace("'", "''") - ), + "[System.Windows.MessageBox]::Show($env:__TS_BODY, $env:__TS_TITLE)", ]) .spawn(); }