From 0978403fa23c7f48b8bd8e2fe15ccf1198aab033 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Sat, 20 Jun 2026 18:19:50 +0530 Subject: [PATCH] fix: Hold stdin when progressbar is active --- VERSION | 2 +- bootstrap.sh | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 59e9e60..bb83058 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.11 +1.0.12 diff --git a/bootstrap.sh b/bootstrap.sh index b56926a..52f645f 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -297,6 +297,9 @@ EOF # Hide cursor printf "\033[?25l" + # Capture install output to a temp file so logs don't bleed into the bar + _install_log=$(mktemp) + # Launch progress bar in background ( for i in $(seq 1 40); do @@ -309,8 +312,8 @@ EOF ) & _bar_pid=$! - # Run installation concurrently - install_bootstrap + # Run installation concurrently, silencing all output to the log file + install_bootstrap >"$_install_log" 2>&1 # Wait for the progress bar to finish wait "$_bar_pid" 2>/dev/null @@ -318,8 +321,11 @@ EOF # Snap to 100% in case install finished before the bar printf "\r%s\033[38;2;0;210;255m%s\033[0m %3d%%" "$_bar_padding" "$_filled_all" 100 - # Restore cursor and print newline - printf "\033[?25h\n\n" + # Restore cursor, clear screen, then replay captured install logs + printf "\033[?25h\n" + clear 2>/dev/null || true + cat "$_install_log" + rm -f "$_install_log" _bootstrap_installed=true fi fi