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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user