fix: gum spin kann keine Bash-Funktionen ausführen
gum spin --title ... -- sudo_run pacman ...
→ gum startet sudo_run als externes Programm, nicht als Bash-Funktion
→ 'executable file not found in path'
Fix: tui_spin benutzt immer die einfache Ausführung ('▶ ... OK/FAILED'),
da gum spin mit Shell-Funktionen (sudo_run) nicht kompatibel ist.
This commit is contained in:
18
lib/tui.sh
18
lib/tui.sh
@@ -174,19 +174,15 @@ tui_spin() {
|
|||||||
shift
|
shift
|
||||||
title="$(_strip_format "$title")"
|
title="$(_strip_format "$title")"
|
||||||
|
|
||||||
if [[ "$OMERON_TUI_MODE" == "gum" ]]; then
|
printf ' ▶ %s ... ' "$title"
|
||||||
gum spin --title "$title" -- "$@"
|
"$@"
|
||||||
|
local rc=$?
|
||||||
|
if ((rc == 0)); then
|
||||||
|
printf '\033[1;32mOK\033[0m\n'
|
||||||
else
|
else
|
||||||
printf ' ▶ %s ... ' "$title"
|
printf '\033[1;31mFAILED\033[0m\n'
|
||||||
"$@"
|
|
||||||
local rc=$?
|
|
||||||
if ((rc == 0)); then
|
|
||||||
printf '\033[1;32mOK\033[0m\n'
|
|
||||||
else
|
|
||||||
printf '\033[1;31mFAILED\033[0m\n'
|
|
||||||
fi
|
|
||||||
return $rc
|
|
||||||
fi
|
fi
|
||||||
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
tui_header() {
|
tui_header() {
|
||||||
|
|||||||
Reference in New Issue
Block a user