From a84da8d67c27f731878b50ded35500f28b9933ba Mon Sep 17 00:00:00 2001 From: 45gfg9 <45gfg9@45gfg9.net> Date: Fri, 3 Nov 2023 23:30:17 +0800 Subject: [PATCH] Just use `pkill` instead of `pgrep` --- SCIMKiller/AppDelegate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SCIMKiller/AppDelegate.swift b/SCIMKiller/AppDelegate.swift index 1e1d644..619fbeb 100644 --- a/SCIMKiller/AppDelegate.swift +++ b/SCIMKiller/AppDelegate.swift @@ -55,7 +55,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { @objc func killSCIM() { let task = Process() task.launchPath = "/bin/sh" - task.arguments = ["-c", "kill -9 $(pgrep SCIM)"] + task.arguments = ["-c", "/usr/bin/pkill -9 SCIM"] do { try task.run() @@ -66,7 +66,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { let task2 = Process() task2.launchPath = "/bin/sh" - task2.arguments = ["-c", "kill -9 $(pgrep SCIM_Extension)"] + task2.arguments = ["-c", "/usr/bin/pkill -9 SCIM_Extension"] do { try task2.run()