fix: nexus integration does not quit prematurely

This commit is contained in:
v4n
2025-05-17 14:23:44 +03:00
parent 13dc822fd9
commit 0fdc5a2306
3 changed files with 6 additions and 3 deletions
+4 -2
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERSION="0.5.4"
VERSION="0.5.5"
# --- Globals ---
@@ -1744,6 +1744,8 @@ function nexus_get_mod_info() {
mod_name=$(echo "$response" | grep -oP '"name":"\K[^"]+')
nexus_mod_version=$(echo "$response" | grep -oP '"version":"\K[^"]+')
[[ -z "$mod_name" || -z "$nexus_mod_version" ]] && { log ERROR "Could not extract mod name and version (inside Nexus info check)."; return 1; }
return 0
}
function nexus_check_for_updates() {
@@ -1862,7 +1864,7 @@ function nexus() {
new_mod_index=$(get_index_by_entry_from_db "$(awk -F, 'END {print $1}' "$DB_FILE")")
[[ -z "$new_mod_index" ]] && { log ERROR "Could not get current mod index."; exit 1; }
[[ $mod_index -ne $old_mod_index ]] && mod_order -i "$new_mod_index" "$mod_index"
[[ $mod_index -ne $new_mod_index ]] && mod_order -i "$new_mod_index" "$mod_index"
log INFO "Mod ${GREEN}successfully${NC} updated: $mod_name."