Pull requests / #398

#398 setup: stop on EOF instead of accepting prompt defaults

closed · @Bortlesboat · 0 comments · View on GitHub

Setup & installNVIDIA / CUDAWindowsLinux

Description

Setup now exits with a clear message when a prompt reaches EOF, preventing closed stdin from accepting the `y` default for Visual Studio Build Tools and CUDA installation. This applies to every `ask()` prompt; pressing Enter or supplying a valid piped answer still works, and `--yes` still accepts each prompt's recommended default.

Validated on Windows with Python 3.12.10: the new regression suite produces four failures before the fix, including attempts to reach the Windows and Linux installer commands; all 68 tests below pass afterward. Five child-process checks also pass with closed or piped stdin, and Ruff reports no issues in the changed files.

```text
python -m unittest tools.test_setup_prompts tools.test_setup_pins tools.test_setup_amd tools.test_setup_lowram tools.test_setup_rope tools.test_calibrate tools.test_shards
ruff check setup.py tools/test_setup_prompts.py
```

Hardware discovery and installer execution are mocked; no system packages or models were downloaded or installed. The shard tests emit ResourceWarnings in unchanged `tools/strata_pack.py`.

Fixes #393.

Related on strata.com

Editorial links to help you install, pick models, or read release notes — not part of the upstream thread.