feature: add startup dependency check for mpv
closes 34be456
diff --git a/src/main.rs b/src/main.rs
@@ -31,6 +31,11 @@ use tokio_tungstenite::{connect_async, tungstenite::protocol::Message};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
+ if Command::new("mpv").arg("--version").output().is_err() {
+ eprintln!("error: missing required dependency 'mpv'. please install it using your system package manager.");
+ std::process::exit(1);
+ }
+
let socket_path = "/tmp/grrs.sock";
let _ = fs::remove_file(socket_path);