Doctor: accept all module arg, survive empty mirrorlist

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp
This commit is contained in:
2026-08-24 18:58:27 -04:00
co-authored by Claude Fable 5
parent 386bf49758
commit 04b2d8836e
+2 -2
View File
@@ -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))