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 #!/usr/bin/env bash
VERSION="0.5.4" VERSION="0.5.5"
# --- Globals --- # --- Globals ---
@@ -1744,6 +1744,8 @@ function nexus_get_mod_info() {
mod_name=$(echo "$response" | grep -oP '"name":"\K[^"]+') mod_name=$(echo "$response" | grep -oP '"name":"\K[^"]+')
nexus_mod_version=$(echo "$response" | grep -oP '"version":"\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; } [[ -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() { 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")") 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; } [[ -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." log INFO "Mod ${GREEN}successfully${NC} updated: $mod_name."
+1
View File
@@ -59,6 +59,7 @@ if [[ -x "$(command -v $SCRIPT_NAME)" ]]; then
log ERROR "Installed version is not in the correct format." log ERROR "Installed version is not in the correct format."
log ERROR "h2mm is installed here -> $(which h2mm)" log ERROR "h2mm is installed here -> $(which h2mm)"
log ERROR "Delete the script file and retry the install script, any mods installed will not be lost." log ERROR "Delete the script file and retry the install script, any mods installed will not be lost."
log INFO 'Download using the command: bash -c "$(curl -fsSL https://raw.githubusercontent.com/v4n00/h2mm-cli/refs/heads/master/install.sh)"'
exit 1 exit 1
fi fi
+1 -1
View File
@@ -1 +1 @@
0.5.4 0.5.5