From 9936b10d37519b3236decffd880dc552ef303fce Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 10 Oct 2025 14:06:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20pass-auth.sh=20=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E7=9B=B4=E6=8E=A5=E6=9B=BF=E6=8D=A2pkexec=E4=BD=BF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/store-helper/pass-auth.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tool/store-helper/pass-auth.sh b/tool/store-helper/pass-auth.sh index dd668b1..cc11a53 100755 --- a/tool/store-helper/pass-auth.sh +++ b/tool/store-helper/pass-auth.sh @@ -1,6 +1,3 @@ -#!/bin/bash -# We use sudo twice to avoid ACE bug here -# https://gitee.com/amber-ce/amber-ce-bookworm/commit/43e1a1599ede474b37e41aa10c53fd8afc4d35a1 #!/bin/bash # We use sudo twice to avoid ACE bug here @@ -14,6 +11,12 @@ function zenity_prompt() { fi } +if [ "${IS_ACE_ENV}" = "" ]; then +echo "检测为非ACE环境,直接提权" +pkexec "$@" +exit $? +fi + # 检查sudo是否需要密码 if sudo -n true 2>/dev/null; then echo "sudo 无需密码,继续执行"