Fix: ESC im Ollama-Speicherort-Dialog fällt auf Standardpfad zurück
whiptail liefert bei ESC den Exit-Code 255, der bisher wie ein explizites "Nein" (Exit-Code 1) behandelt und in den Eingabedialog für einen eigenen Pfad geleitet wurde. Das widersprach dem direkt folgenden Eingabedialog, in dem ESC/Abbruch stattdessen den Standardpfad übernimmt. ESC verhält sich jetzt in beiden Dialogen gleich. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017WMUd2fGsPCtTCVQkSS5TA
This commit is contained in:
+7
-2
@@ -259,10 +259,15 @@ prompt_ollama_models_path() {
|
|||||||
# whether the configured default path should be used, and only show
|
# whether the configured default path should be used, and only show
|
||||||
# the free-text path dialog (pre-filled with that default) if not.
|
# the free-text path dialog (pre-filled with that default) if not.
|
||||||
if command_exists whiptail && has_tty; then
|
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" \
|
--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?" \
|
--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"
|
chosen="$default_path"
|
||||||
else
|
else
|
||||||
local tui_tmp
|
local tui_tmp
|
||||||
|
|||||||
Reference in New Issue
Block a user