From 7265e7078cd5bb795362e7b7b4f509ba2a26431b Mon Sep 17 00:00:00 2001 From: XargonWan Date: Fri, 10 Jan 2025 10:46:12 +0900 Subject: [PATCH] FINIT: fixed the initial setup option not showing --- functions/other_functions.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/functions/other_functions.sh b/functions/other_functions.sh index 2198a761..986d610e 100644 --- a/functions/other_functions.sh +++ b/functions/other_functions.sh @@ -372,14 +372,12 @@ done finit_user_options_dialog() { finit_available_options=() + finit_extracted_options=$(jq -r '.finit_default_options | to_entries[] | "\(.value.enabled)^\(.value.name)^\(.value.description)^\(.key)"' "$features") - while IFS="^" read -r enabled option_name option_desc option_tag || [[ -n "$enabled" ]]; - do - if [[ ! $enabled == "#"* ]] && [[ ! -z "$enabled" ]]; then - finit_available_options=("${finit_available_options[@]}" "$enabled" "$option_name" "$option_desc" "$option_tag") - fi - done < $finit_options_list - + # Read finit_default_options from features.json using jq + while IFS="^" read -r enabled option_name option_desc option_tag; do + finit_available_options+=("$enabled" "$option_name" "$option_desc" "$option_tag") + done <<< "$finit_extracted_options" local choices=$(rd_zenity \ --list --width=1200 --height=720 \