Fixed errors in the install helper.

This commit is contained in:
Storm Dragon
2025-10-09 23:20:38 -04:00
parent a02a8743d2
commit 88120d448e
+12 -2
View File
@@ -170,8 +170,10 @@ auto_install() {
# Try to find in games registry
if [[ -f "$GAMES_REGISTRY" ]]; then
echo "Reading games registry: $GAMES_REGISTRY" >> "$LOG_FILE"
local game_info
game_info=$(jq -r ".downloadable_games[\"$item_id\"] // empty" "$GAMES_REGISTRY" 2>/dev/null)
game_info=$(jq -r ".downloadable_games[\"$item_id\"] // empty" "$GAMES_REGISTRY" 2>> "$LOG_FILE")
echo "Game info result: ${game_info:-empty}" >> "$LOG_FILE"
if [[ -n "$game_info" ]]; then
local name url directory executable game_dir
@@ -239,6 +241,14 @@ auto_install() {
fi
# Item not found in any registry
echo "Error: Item not found in registries: $item_id" >> "$LOG_FILE"
if [[ ! -f "$GAMES_REGISTRY" ]] && [[ ! -f "$PACKAGES_REGISTRY" ]]; then
echo "Error: Registry files not found!" >> "$LOG_FILE"
echo " Expected: $GAMES_REGISTRY" >> "$LOG_FILE"
echo " Expected: $PACKAGES_REGISTRY" >> "$LOG_FILE"
speak "Error: Installation registry files not found. This may be a development system."
else
echo "Error: Item not found in registries: $item_id" >> "$LOG_FILE"
speak "Error: $item_id not found in installation registry"
fi
return 4
}