fix(install-windows): pull models last, so Ctrl+C can't abort the install
Ctrl+C in PS 5.1 kills the whole script, and the multi-GB model pull sat in the middle -- skipping the download also skipped the ncp PATH registration and the desktop shortcut. Moves the pull after them. Also drops the pipe that buffered ollama's progress bar (a running download looked like a hang) and replaces a try/catch that native commands never trigger with $LASTEXITCODE checks. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -86,6 +86,16 @@ def test_ncp_is_registered_on_path_not_in_a_shell_profile():
|
||||
assert "setx" not in code.lower()
|
||||
assert 'SetEnvironmentVariable("Path"' in code
|
||||
|
||||
# The model pull is the only multi-GB step and the only one the script
|
||||
# invites a Ctrl+C on -- which in PS 5.1 kills the whole script. Anything
|
||||
# after it is lost, so it has to come last. It used to sit in the middle,
|
||||
# and skipping the download silently skipped the ncp registration too.
|
||||
assert ps1.index("ollama pull") > ps1.index("Registering the ncp command"), \
|
||||
"model pull must come after ncp registration - a Ctrl+C there aborts the installer"
|
||||
assert ps1.index("ollama pull") > ps1.index("Creating desktop shortcut"), \
|
||||
"model pull must come after the desktop shortcut"
|
||||
|
||||
|
||||
|
||||
def test_first_playbook_is_the_system_prompt(tmp_path, monkeypatch):
|
||||
store = PlaybookFileStore(tmp_path)
|
||||
|
||||
Reference in New Issue
Block a user