Fixed errors in the install helper.
This commit is contained in:
@@ -170,8 +170,10 @@ auto_install() {
|
|||||||
|
|
||||||
# Try to find in games registry
|
# Try to find in games registry
|
||||||
if [[ -f "$GAMES_REGISTRY" ]]; then
|
if [[ -f "$GAMES_REGISTRY" ]]; then
|
||||||
|
echo "Reading games registry: $GAMES_REGISTRY" >> "$LOG_FILE"
|
||||||
local game_info
|
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
|
if [[ -n "$game_info" ]]; then
|
||||||
local name url directory executable game_dir
|
local name url directory executable game_dir
|
||||||
@@ -239,6 +241,14 @@ auto_install() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Item not found in any registry
|
# 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
|
return 4
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user