fix(install): fail non-tauri installer errors (#7123)
This commit is contained in:
parent
14d0e853fa
commit
3eb3259f04
2 changed files with 23 additions and 1 deletions
|
|
@ -91,6 +91,7 @@ function Install-UnslothStudio {
|
|||
if ($TauriMode) {
|
||||
exit $Code
|
||||
}
|
||||
throw $Message
|
||||
}
|
||||
|
||||
# ── Parse flags ──
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue