fix: elevated helper stderr 重定向到 stdout,修复日志丢失问题

This commit is contained in:
hicccc77
2026-03-14 20:29:27 +08:00
parent 3af530a15e
commit a4b0a25dab

View File

@@ -363,7 +363,7 @@ export class KeyServiceMac {
// 用 AppleScript 的 quoted form 组装命令,避免复杂 shell 拼接导致整条失败 // 用 AppleScript 的 quoted form 组装命令,避免复杂 shell 拼接导致整条失败
const scriptLines = [ const scriptLines = [
`set helperPath to ${JSON.stringify(helperPath)}`, `set helperPath to ${JSON.stringify(helperPath)}`,
`set cmd to quoted form of helperPath & " ${pid} ${waitMs}"`, `set cmd to quoted form of helperPath & " ${pid} ${waitMs} 2>&1"`,
'do shell script cmd with administrator privileges' 'do shell script cmd with administrator privileges'
] ]
onStatus?.('已准备就绪,现在登录微信或退出登录后重新登录微信', 0) onStatus?.('已准备就绪,现在登录微信或退出登录后重新登录微信', 0)