While using this library to fire alerts for a golang app (more specifically an osquery plugin) which runs as root, alerts wouldn't fire as root had no logged in session. Setting the osascript to tell application "System Events" made the alert popup on the currently logged in users screen.
While using this library to fire alerts for a golang app (more specifically an osquery plugin) which runs as root, alerts wouldn't fire as root had no logged in session. Setting the osascript to
tell application "System Events"
made the alert popup on the currently logged in users screen.