From 8b8c5f33ce9685f847ff668790426c15754fb763 Mon Sep 17 00:00:00 2001 From: cc <98377878+hicccc77@users.noreply.github.com> Date: Thu, 26 Mar 2026 22:34:50 +0800 Subject: [PATCH] 333 --- electron/services/keyServiceMac.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electron/services/keyServiceMac.ts b/electron/services/keyServiceMac.ts index c304134..e7642a9 100644 --- a/electron/services/keyServiceMac.ts +++ b/electron/services/keyServiceMac.ts @@ -385,11 +385,11 @@ export class KeyServiceMac { // 通过 try/on error 回传详细错误,避免只看到 "Command failed" const scriptLines = [ `set helperPath to ${JSON.stringify(helperPath)}`, - `set cmd to quoted form of helperPath & " ${pid} ${waitMs} 2>&1"`, + `set cmd to quoted form of helperPath & " ${pid} ${waitMs}"`, `set timeoutSec to ${timeoutSec}`, 'try', 'with timeout of timeoutSec seconds', - 'set outText to do shell script cmd with administrator privileges', + 'set outText to do shell script (cmd & " 2>&1") with administrator privileges', 'end timeout', 'return "WF_OK::" & outText', 'on error errMsg number errNum partial result pr',