Skip to content

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

Closed
Bortlesboat wants to merge 1 commit into
Niko1221:mainfrom
Bortlesboat:fix/setup-eof-confirmation
Closed

Bortlesboat wants to merge 1 commit into
Niko1221:mainfrom
Bortlesboat:fix/setup-eof-confirmation

Conversation

@Bortlesboat

Copy link
Copy Markdown
Contributor

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.

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.

@Niko1221

Niko1221 commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Released in 0.1.33 as is. Merged under your name (GitHub doesn't show it as merged because it went in by hand). Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup.py: ask() takes the default on EOF, so a non-interactive run installs VS Build Tools + CUDA via winget

2 participants