From 8aad069226a0636e0673d56c54cbb8e741de57d7 Mon Sep 17 00:00:00 2001 From: Sanooj Es Date: Thu, 2 Oct 2025 21:05:58 +0530 Subject: [PATCH] fix: use exact match with pkill to terminate only Spotify --- src/cmd/restart.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/restart.go b/src/cmd/restart.go index b55023e355..44778fa80d 100644 --- a/src/cmd/restart.go +++ b/src/cmd/restart.go @@ -21,13 +21,13 @@ func SpotifyKill() { isRunning := exec.Command("pgrep", "spotify") _, err := isRunning.Output() if err == nil { - exec.Command("pkill", "spotify").Run() + exec.Command("pkill", "-x", "spotify").Run() } case "darwin": isRunning := exec.Command("sh", "-c", "ps aux | grep 'Spotify' | grep -v grep") _, err := isRunning.CombinedOutput() if err == nil { - exec.Command("pkill", "Spotify").Run() + exec.Command("pkill", "-x", "Spotify").Run() } } }