修复 availableAddons 函数中的描述输出,确保无非法字符

This commit is contained in:
Ing 2025-05-16 23:02:04 +08:00
parent 1133fb0ba5
commit 52fdae2210

View File

@ -28,7 +28,9 @@ function availableAddons() {
[ -z "${DESC}" ] && DESC="$(readConfigKey "description.${LOCALE:-"en_US"}" "${D}/manifest.yml")" [ -z "${DESC}" ] && DESC="$(readConfigKey "description.${LOCALE:-"en_US"}" "${D}/manifest.yml")"
[ -z "${DESC}" ] && DESC="$(readConfigKey "description.en_US" "${D}/manifest.yml")" [ -z "${DESC}" ] && DESC="$(readConfigKey "description.en_US" "${D}/manifest.yml")"
[ -z "${DESC}" ] && DESC="$(readConfigKey "description" "${D}/manifest.yml")" [ -z "${DESC}" ] && DESC="$(readConfigKey "description" "${D}/manifest.yml")"
echo -e "${ADDON}\t${DESC:-"unknown"}" [ -z "${DESC}" ] && DESC="unknown"
echo -e "${ADDON}\t$(echo "${DESC}" | sed -E 's/["\n]/ /g')"
done <<<"$(find "${ADDONS_PATH}" -maxdepth 1 -type d 2>/dev/null | sort)" done <<<"$(find "${ADDONS_PATH}" -maxdepth 1 -type d 2>/dev/null | sort)"
} }