diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-30 21:39:24 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-30 21:39:57 +0100 |
commit | d4ac5da8c38e5badee1ce8a3497e59f525bb31ae (patch) | |
tree | a23d68580c614854f81d828c2ec2fbe83685445c | |
parent | 72f114c4f56621b1cb413f9743c136971283c783 (diff) | |
download | alpine-conf-d4ac5da8c38e5badee1ce8a3497e59f525bb31ae.zip |
setup-apkrepos: prevent adding empty mirror
fixes #8108
-rw-r--r-- | setup-apkrepos.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/setup-apkrepos.in b/setup-apkrepos.in index ed6cb8b..3ad7e7c 100644 --- a/setup-apkrepos.in +++ b/setup-apkrepos.in @@ -74,6 +74,10 @@ find_fastest_mirror() { add_fastest_mirror() { echo "Finding fastest mirror... " local fastest=$(find_fastest_mirror) + if [ -z "$fastest" ]; then + echo "Warning! No mirror found" + return 1 + fi add_mirror "$fastest" } |