From 04b2d8836ebb42a61feeaa6a0a8139ee72f058bc 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:58:27 -0400 Subject: [PATCH] Doctor: accept all module arg, survive empty mirrorlist Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp --- bin/omarchy-cn-doctor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-cn-doctor b/bin/omarchy-cn-doctor index fae37ae0..58cb682f 100755 --- a/bin/omarchy-cn-doctor +++ b/bin/omarchy-cn-doctor @@ -11,7 +11,7 @@ module="all" fix="false" for arg in "$@"; do case "$arg" in - network | mirror | dev-mirror) module="$arg" ;; + all | network | mirror | dev-mirror) module="$arg" ;; --fix) fix="true" ;; *) echo "Unknown argument: $arg" >&2 @@ -43,7 +43,7 @@ check_network() { check_mirror() { local primary speed ttfb age - primary=$(grep -sE '^Server' "$CN_MIRRORLIST" | head -1 | sed -E 's/^Server = //; s|/\$repo/os/\$arch/?$||') + primary=$(grep -sE '^Server' "$CN_MIRRORLIST" | head -1 | sed -E 's/^Server = //; s|/\$repo/os/\$arch/?$||' || true) if [[ -z $primary ]]; then echo "FAIL mirror: no Server entries in $CN_MIRRORLIST" failures=$((failures + 1))