From 6aa1ec4201762924f91b30a23131ea9fe470039b 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 e8f35ef..4b65df6 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -369,6 +369,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')