mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 03:20:12 -08:00
refactor: Improve mirror selection feedback in package installation process
This commit is contained in:
@@ -204,10 +204,13 @@ case $PKG_MANAGER in
|
|||||||
sudo rm -f /etc/apt/sources.list.d/nala-sources.list 2>/dev/null
|
sudo rm -f /etc/apt/sources.list.d/nala-sources.list 2>/dev/null
|
||||||
|
|
||||||
# Try to fetch mirrors with less aggressive settings
|
# Try to fetch mirrors with less aggressive settings
|
||||||
if ! sudo nala fetch --auto --fetches 1 --country auto; then
|
echo -e "${YELLOW}Attempting to find faster mirrors (this may fail and that's okay)...${NC}"
|
||||||
echo -e "${YELLOW}Mirror selection failed, continuing with system default mirrors...${NC}"
|
if ! sudo nala fetch --auto --fetches 1 --country auto 2>/dev/null; then
|
||||||
|
echo -e "${YELLOW}Note: Fast mirror selection failed, using default mirrors (this is normal and safe)${NC}"
|
||||||
# Remove any potentially corrupted Nala sources
|
# Remove any potentially corrupted Nala sources
|
||||||
sudo rm -f /etc/apt/sources.list.d/nala-sources.list 2>/dev/null
|
sudo rm -f /etc/apt/sources.list.d/nala-sources.list 2>/dev/null
|
||||||
|
else
|
||||||
|
echo -e "${GREEN}Fast mirrors configured successfully!${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install packages using Nala
|
# Install packages using Nala
|
||||||
|
|||||||
Reference in New Issue
Block a user