From 0050f3a4a8f8c8c9d1ece251083aa6b8a7369b37 Mon Sep 17 00:00:00 2001 From: Pathfinder Date: Tue, 27 Oct 2026 19:37:20 +0100 Subject: [PATCH] =?UTF-8?q?Prime=20sudo=20up=20front=20(sudo=20-v)=20?= =?UTF-8?q?=E2=80=94=20password=20prompt=20no=20longer=20lands=20mid-line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First sudo call of the session printed its password prompt straight into the live progress line: 'Installing (optional): gum[sudo] password for yuri:' (VM screenshot). sudo -v asks once, on a clean screen, right after the banner; the timestamp refreshes on every later sudo use, so one prompt covers the whole run. --- setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.sh b/setup.sh index d04e092..f55857c 100755 --- a/setup.sh +++ b/setup.sh @@ -103,6 +103,14 @@ if [[ ${EUID} -eq 0 ]]; then exit 1 fi +# Ask for the sudo password ONCE, up front, on a clean screen. Otherwise the +# first sudo call mid-run prints its prompt straight into the live progress +# line ("Installing (optional): gum[sudo] password for yuri:" — VM-proven). +# The timestamp refreshes on every subsequent sudo use, so one prompt covers +# the whole run. +info "Requesting sudo credentials (asked once for the whole run)..." +sudo -v + if [[ "$ASSUME_YES" == "true" && ( -z "$DE" || -z "$TWM" ) ]]; then err "--yes requires explicit --de and --twm, so nothing is guessed on an" err "unattended run. Example:"