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

This commit is contained in:
Kushida 2026-07-15 14:37:03 +03:00 committed by GitHub
commit 3eb3259f04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 1 deletions

View file

@ -91,6 +91,7 @@ function Install-UnslothStudio {
if ($TauriMode) {
exit $Code
}
throw $Message
}
# ── Parse flags ──

View file

@ -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():
)
@pytest.mark.skipif(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