From 6ad4746420066c18bd0c86ebd76a0ab87c6fcd87 Mon Sep 17 00:00:00 2001 From: Thijs Date: Tue, 9 Jun 2026 18:57:02 +0200 Subject: [PATCH] fix(enter): re-prompt instead of aborting on invalid input When 'towel enter' finds no container, it asks whether to create one in a while-read loop. An unconditional 'exit 1' sat after the case statement, inside the loop body, so any answer that fell through to the '*' (invalid) branch printed "Invalid input." and then immediately exited with status 1. The loop could therefore never iterate, defeating the purpose of prompting: a single typo aborted the command instead of asking again. Remove the stray 'exit 1'. The yes branch already breaks (then enters the container) and the no branch exits, so invalid input now falls through and the loop re-prompts as intended. Related to #13 --- user/local/share/towel/bin/towel-enter | 1 - 1 file changed, 1 deletion(-) diff --git a/user/local/share/towel/bin/towel-enter b/user/local/share/towel/bin/towel-enter index 5c8d790..b2839bc 100755 --- a/user/local/share/towel/bin/towel-enter +++ b/user/local/share/towel/bin/towel-enter @@ -24,7 +24,6 @@ elif ! towel_exists; then echo "Invalid input." 1>&2 ;; esac - exit 1 done fi distrobox enter towel