[PR #398] [CLOSED] setup: stop on EOF instead of accepting prompt defaults #2621

Closed
opened 2026-11-04 02:01:48 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/398
Author: @Bortlesboat
Created: 10/1/2026
Status: ❌ Closed

Base: main ← Head: fix/setup-eof-confirmation


📝 Commits (1)

  • 2cea708 setup: stop on EOF instead of accepting prompt defaults

📊 Changes

2 files changed (+91 additions, -1 deletions)

View changed files

📝 setup.py (+2 -1)
➕ tools/test_setup_prompts.py (+89 -0)

📄 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.

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/398 **Author:** [@Bortlesboat](https://github.com/Bortlesboat) **Created:** 10/1/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/setup-eof-confirmation` --- ### 📝 Commits (1) - [`2cea708`](https://github.com/Niko1221/Strata/commit/2cea708bf1e7e8b8693c5f2a2317e0a4e50e5b9b) setup: stop on EOF instead of accepting prompt defaults ### 📊 Changes **2 files changed** (+91 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `setup.py` (+2 -1) ➕ `tools/test_setup_prompts.py` (+89 -0) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:01:48 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2621
No description provided.