Prime sudo up front (sudo -v) — password prompt no longer lands mid-line
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.
This commit is contained in:
@@ -103,6 +103,14 @@ if [[ ${EUID} -eq 0 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
if [[ "$ASSUME_YES" == "true" && ( -z "$DE" || -z "$TWM" ) ]]; then
|
||||||
err "--yes requires explicit --de and --twm, so nothing is guessed on an"
|
err "--yes requires explicit --de and --twm, so nothing is guessed on an"
|
||||||
err "unattended run. Example:"
|
err "unattended run. Example:"
|
||||||
|
|||||||
Reference in New Issue
Block a user