From 620c1dd6fae0f0f83212e9f6b6fb27c1faf67b83 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 19 May 2025 22:59:20 +0100 Subject: get.sh: Make xbmkget err on exiting the loop check The idea in this function is that if a file or repo is successfully handled, a return will be performed from the loop. If the loop exits for any reason, an error is thrown. The current code is probably fine, but I can forsee future modifications possibly causing bugs here. Make it unambiguous, by always throwing an error if execution reaches the end of the function. Signed-off-by: Leah Rowe --- include/get.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/get.sh b/include/get.sh index 667ab398..ab6ff401 100644 --- a/include/get.sh +++ b/include/get.sh @@ -87,7 +87,8 @@ xbmkget() for url in "$2" "$3"; do [ -n "$url" ] && try_file "$url" "$@" && \ eval "[ -$echk \"$4\" ] && return 0" - done && err "$1 $2 $3 $4: not downloaded"; : + done + err "$1 $2 $3 $4: not downloaded"; : } try_file() -- cgit v1.2.1