From be2a122e210c8e4033e18e52d9d0cbb26f7d9310 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 12 Jun 2026 07:35:17 -0700 Subject: [PATCH] install.sh: keep the studio launch from draining the curl | sh script (#6258) When installed via 'curl -fsSL https://unsloth.ai/install.sh | sh', the shell reads the script from the pipe on stdin. The optional 'start now' step launches 'unsloth studio' in the foreground, and as a server it inherits and drains the rest of the piped script from stdin. The shell then hits EOF partway through the trailing if/case and dies with 'Syntax error: end of file unexpected (expecting fi)' (reported on WSL, where /bin/sh is dash). Redirect the launch's stdin away from the pipe so the script stays intact. The server does not read stdin and Ctrl+C still works via the controlling terminal. --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8e39a01b1d..d13689150a 100755 --- a/install.sh +++ b/install.sh @@ -2900,7 +2900,10 @@ if [ -t 1 ]; then case "${_reply:-y}" in [Yy]*|"") step "launch" "starting Unsloth Studio..." - "$VENV_DIR/bin/unsloth" studio -p 8888 + # Detach stdin from the `curl | sh` pipe: as a foreground server the + # studio would otherwise drain the rest of this piped script, leaving + # the shell to die parsing the now-truncated tail (`unexpected fi`). + "$VENV_DIR/bin/unsloth" studio -p 8888