fix: stdout-leak in collect_all_interactive Subshell killte Module-Auswahl

collect_all_interactive wurde via <(...) in einer Subshell ausgeführt, deren
stdout an mapfile gebunden war. ALLE Ausgaben (log_step, tui_confirm-Prompts,
tui_info etc.) landeten im modules_to_run-Array → mapfile las Müllzeilen wie
'━━━ [4/7] ... ━━━' als Modul-Pfade → module_run('━━━ ... ━━━') → 'not found'.

Fix: exec 1>&2 zu Beginn der Subshell, nur die tatsächlichen Modul-Pfade
werden über erhaltenen fd 3 (> original stdout) an mapfile gegeben.
Prompt sagt jetzt auch welcher Step ('Run Modulbeschreibung?' statt
'Run this step?').
This commit is contained in:
2026-05-27 21:56:39 +02:00
parent fa17585afc
commit e87596f535

View File

@@ -162,6 +162,9 @@ collect_modules() {
} }
collect_all_interactive() { collect_all_interactive() {
exec 3>&1
exec 1>&2
local modules=() local modules=()
if ((OMERON_FRESH_INSTALL)); then if ((OMERON_FRESH_INSTALL)); then
modules=("${FRESH_MODULES[@]}") modules=("${FRESH_MODULES[@]}")
@@ -196,7 +199,7 @@ collect_all_interactive() {
fi fi
fi fi
if tui_confirm "Run this step?"; then if tui_confirm "${description:-$mod}?"; then
module_order+=("$module_file") module_order+=("$module_file")
else else
log_info "Skipped" log_info "Skipped"
@@ -204,7 +207,8 @@ collect_all_interactive() {
((idx++)) ((idx++))
done done
printf '%s\n' "${module_order[@]}" printf '%s\n' "${module_order[@]}" >&3
exec 3>&-
} }
show_banner() { show_banner() {