Ensure all_systems array is empty every time build_preset_list_options() is run

- This prevents all_systems array from having multiple copies of all systems when run multiple times in the same session, which would cause make_preset_changes() to run build_preset_config() multiple times.
This commit is contained in:
icenine451 2024-10-15 12:03:58 -04:00
parent c8c5e2ba41
commit 880c4b8213

View file

@ -49,6 +49,7 @@ build_preset_list_options() {
current_disabled_systems=()
changed_systems=()
changed_presets=()
all_systems=()
local section_results=$(sed -n '/\['"$preset"'\]/, /\[/{ /\['"$preset"'\]/! { /\[/! p } }' $rd_conf | sed '/^$/d')
while IFS= read -r config_line