From 4d9174b9ea1289e131ace2f45d00546ba170c979 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 4 Jun 2026 00:12:53 -0700 Subject: [PATCH] install.sh: redirect Windows exes from /dev/null (fix curl|sh stdin drain) `curl https://unsloth.ai/install.sh | sh` runs install.sh from a pipe, so the script *is* the shell's stdin. A Windows process launched via WSL interop (powershell.exe / cmd.exe) inherits that stdin and drains the remaining piped script, truncating it -- dash then aborts parsing the tail with "Syntax error: Unterminated quoted string". This surfaced as a non-fatal "sh: : Unterminated quoted string" near the end of every non-tty install (e.g. the WoA install.ps1 -> curl|sh flow). Add ` --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index bd8aca56fc..8cc69a3132 100755 --- a/install.sh +++ b/install.sh @@ -732,9 +732,9 @@ _open_browser() { elif grep -qi microsoft /proc/version 2>/dev/null; then # WSL: xdg-open is unreliable; use Windows browser via PowerShell or cmd if command -v powershell.exe >/dev/null 2>&1; then - powershell.exe -NoProfile -Command "Start-Process '$_url'" >/dev/null 2>&1 & + powershell.exe -NoProfile -Command "Start-Process '$_url'" /dev/null 2>&1 & elif command -v cmd.exe >/dev/null 2>&1; then - cmd.exe /c start "" "$_url" >/dev/null 2>&1 & + cmd.exe /c start "" "$_url" /dev/null 2>&1 & elif command -v xdg-open >/dev/null 2>&1; then xdg-open "$_url" >/dev/null 2>&1 & else @@ -1232,7 +1232,7 @@ WSLPS1_EOF # Convert WSL path to Windows path for powershell.exe _css_ps1_win=$(wslpath -w "$_css_ps1_tmp" 2>/dev/null) if [ -n "$_css_ps1_win" ]; then - powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$_css_ps1_win" >/dev/null 2>&1 && _css_created=1 + powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$_css_ps1_win" /dev/null 2>&1 && _css_created=1 fi rm -f "$_css_ps1_tmp" fi