fix(安装管理): 将 ssaudit 命令替换为 ssinstall 并添加版本检查

弃用 ssaudit 命令,统一使用 ssinstall 进行安装
在 shell-caller.sh 中添加对 ssaudit 的禁用检查和 ssinstall 失败时的版本提示
This commit is contained in:
2026-03-29 14:24:58 +08:00
parent 5b2d96cf0a
commit 33c48f4543
2 changed files with 12 additions and 1 deletions

View File

@@ -276,7 +276,7 @@ ipcMain.on("queue-install", async (event, download_json) => {
execParams.push("apm");
if (metalinkUrl && filename) {
execParams.push("ssaudit", `${downloadDir}/${filename}`);
execParams.push("ssinstall", `${downloadDir}/${filename}`);
} else {
execParams.push("install", "-y", pkgname);
}

View File

@@ -60,9 +60,20 @@ case "$command_type" in
echo "提示:如需调试,请使用其他方式。"
exit 1
fi
# 禁止 apm ssaudit 命令(已弃用,请使用 apm ssinstall
if [[ "$2" == "ssaudit" ]]; then
echo "错误apm ssaudit 命令已被弃用,请使用 apm ssinstall。"
echo "提示:请将 APM 升级到 1.2.2 版本以上以继续使用安装功能。"
exit 1
fi
# 执行 apm 命令(跳过第一个参数)
/usr/bin/apm "${@:2}" 2>&1
exit_code=$?
# 如果 apm ssinstall 执行失败,提示可能是版本过低
if [[ "$2" == "ssinstall" && "$exit_code" != "0" ]]; then
echo "提示apm ssinstall 执行失败,可能是您的 APM 版本过低(需要 1.2.2+)。"
echo "请升级 APM 到 1.2.2 版本以上来继续安装。"
fi
;;
"ssinstall")