From 3e4aca0346d56ab2dd59673daaa9117fe0177b16 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 22 Jun 2026 10:56:00 +0000 Subject: [PATCH] Installer: respect a declined Studio auto-start and keep Ctrl+C shutdown logs ordered The `curl | sh` Studio auto-start prompt had two issues on Linux/macOS/WSL (install.sh). install.ps1 already gates on input redirection, so Windows is unaffected. 1. Typing n, or any closed/EOF /dev/tty, still launched Studio. The read fallbacks defaulted to "y" (read failure, and the no-tty branch), so any answer other than a cleanly delivered y/n line auto-started a blocking foreground server. Default those to "n"; a real Enter still counts as yes via ${_reply:-y}. 2. On Ctrl+C the shell prompt printed in the middle of Studio's shutdown logs. The non-interactive installer shell took the default SIGINT action and died before the child finished its graceful shutdown, so the prompt raced ahead of "All subprocesses cleaned up". trap '' INT in the installer shell so it waits for Studio's own graceful shutdown. --- install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 7a3c490368..e2a297adba 100755 --- a/install.sh +++ b/install.sh @@ -3126,10 +3126,13 @@ echo "" if [ -t 1 ]; then echo "" printf " Start Unsloth Studio now? [Y/n] " + # Default to NOT starting when no answer can be read (closed/EOF tty) so a + # non-interactive caller is never trapped in a foreground server. A real + # Enter still counts as yes via ${_reply:-y} below. if [ -r /dev/tty ]; then - read -r _reply