diff --git a/lib/utils.sh b/lib/utils.sh index 8e86836..343e275 100755 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -259,10 +259,15 @@ prompt_ollama_models_path() { # whether the configured default path should be used, and only show # the free-text path dialog (pre-filled with that default) if not. if command_exists whiptail && has_tty; then - if run_whiptail --title "Ollama KI-Modelle Speicherort" \ + local yesno_status=0 + run_whiptail --title "Ollama KI-Modelle Speicherort" \ --yes-button "Standard verwenden" --no-button "Eigenen Pfad angeben" \ --yesno "Standard-Speicherort für Ollama-Modelle:\n\n$default_path\n\nMöchtest du diesen Speicherort verwenden?" \ - 12 70; then + 12 70 || yesno_status=$? + if [[ "$yesno_status" -eq 0 || "$yesno_status" -eq 255 ]]; then + # Yes, or ESC/Cancel (255) - fall back to the configured + # default, consistent with the inputbox dialog below where + # ESC/Cancel also keeps the default instead of asking again. chosen="$default_path" else local tui_tmp