Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

fix(install): fail non-tauri installer errors (#7123)

Kushida3eb3259f047a
diff --git a/install.ps1 b/install.ps1
index 100a3177ba3..0b32d7cb6cc 100644
--- a/install.ps1
+++ b/install.ps1
@@ -91,6 +91,7 @@ function Install-UnslothStudio {
if ($TauriMode) {
exit $Code
}
+ throw $Message
}
# ── Parse flags ──
diff --git a/tests/test_installer_skip_autostart.py b/tests/test_installer_skip_autostart.py
index 8c283f4458f..fcc199af447 100644
--- a/tests/test_installer_skip_autostart.py
+++ b/tests/test_installer_skip_autostart.py
@@ -1,4 +1,4 @@
-"""Regression tests for the installers' post-install autostart opt-out."""
+"""Regression tests for installer controls and process exits."""
from __future__ import annotations
@@ -120,6 +120,27 @@ def test_windows_skip_autostart_bypasses_only_the_interactive_prompt():
)
[email protected](shutil.which("pwsh") is None, reason = "PowerShell is unavailable")
+def test_windows_installer_invalid_package_fails():
+ result = subprocess.run(
+ [
+ "pwsh",
+ "-NoProfile",
+ "-NonInteractive",
+ "-File",
+ str(INSTALL_PS1),
+ "--package",
+ "bad!",
+ ],
+ capture_output = True,
+ text = True,
+ timeout = 30,
+ )
+
+ assert result.returncode != 0
+ assert "package name contains invalid characters" in result.stdout + result.stderr
+
+
def test_skip_autostart_is_documented_for_all_installers():
readme = README.read_text(encoding = "utf-8")
assert "UNSLOTH_SKIP_AUTOSTART=1 sh" in readme