From 434f848dd84aa1786133f391698f8a8663380ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Mon, 24 Aug 2026 18:35:11 -0400 Subject: [PATCH] Mirror manager: shellcheck fixes Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp --- bin/omarchy-cn-mirror-apply | 3 ++- cn/lib/mirror.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-cn-mirror-apply b/bin/omarchy-cn-mirror-apply index 3ee99540..41b2dc90 100755 --- a/bin/omarchy-cn-mirror-apply +++ b/bin/omarchy-cn-mirror-apply @@ -13,7 +13,8 @@ target="${1:?usage: omarchycn mirror apply }" case "$target" in china) echo "Benchmarking China mirrors..." - mapfile -t ranked < <(cn_mirror_rank $(cn_mirror_ids_by_region cn)) + mapfile -t cn_ids < <(cn_mirror_ids_by_region cn) + mapfile -t ranked < <(cn_mirror_rank "${cn_ids[@]}") if (( ${#ranked[@]} == 0 )); then echo "No healthy China mirror reachable; keeping current mirrorlist" >&2 exit 1 diff --git a/cn/lib/mirror.sh b/cn/lib/mirror.sh index 2ce55c09..3108a2b7 100644 --- a/cn/lib/mirror.sh +++ b/cn/lib/mirror.sh @@ -1,3 +1,4 @@ +# shellcheck shell=bash # Sourced helpers for omarchy-cn-mirror-* commands CN_MIRRORS_JSON="$OMARCHY_PATH/cn/mirrors.json"