From 5654b327d42fc6d8c9e6b65e8106930c26677d06 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 17 Oct 2025 04:20:13 +0900 Subject: [PATCH] fix: early abort if local coords are missing --- helpers/funcs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helpers/funcs b/helpers/funcs index c747c82..3f0b44e 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -425,6 +425,10 @@ local_latlon(){ get_dist(){ shift local given_ip="$1" + if [[ ! -f $_cache_coords ]]; then + printf "Unknown" + return + fi readarray -t coords < "$_cache_coords" readarray -t n < <(<<< "$given_ip" awk 'BEGIN{RS="."}{$1=$1}1')