[GH-ISSUE #393] setup.py: ask() takes the default on EOF, so a non-interactive run installs VS Build Tools + CUDA via winget #182

Closed
opened 2026-11-04 01:40:43 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Efs-O on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/393

ask() (setup.py:151) returns default on EOFError. The build-tools prompt (setup.py:1053) is

if ask("  Install them now?", ["y", "n"], "y", yes) != "y":

with default "y". So a run with stdin closed or redirected goes straight to winget install ... --disable-interactivity for Visual Studio 2022 Build Tools and CUDA 13.0, about 8-10 GB. Examples: a CI step, an agent driving the installer, or python setup.py < NUL. Nobody answered yes.

Suggestion:

  • On EOF, either fail or use the safe default for prompts that install system software.
  • Or make the default for this prompt "n" whenever stdin is not a TTY.

--yes already covers the case where someone really wants unattended installs.

Originally created by @Efs-O on GitHub (Oct 1, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/393 `ask()` (setup.py:151) returns `default` on `EOFError`. The build-tools prompt (setup.py:1053) is ``` if ask(" Install them now?", ["y", "n"], "y", yes) != "y": ``` with default `"y"`. So a run with stdin closed or redirected goes straight to `winget install ... --disable-interactivity` for Visual Studio 2022 Build Tools and CUDA 13.0, about 8-10 GB. Examples: a CI step, an agent driving the installer, or `python setup.py < NUL`. Nobody answered yes. **Suggestion:** - On EOF, either fail or use the *safe* default for prompts that install system software. - Or make the default for this prompt `"n"` whenever stdin is not a TTY. `--yes` already covers the case where someone really wants unattended installs.
Author
Owner

@Niko1221 commented on GitHub (Oct 1, 2026):

Thanks! Fixed for the next release with PR #398 (Bortlesboat): when input ends before an answer, setup stops with a clear message instead of taking the default; --yes still accepts the recommended answers. This issue closes with the release.

<!-- gh-comment-id:5938542388 --> @Niko1221 commented on GitHub (Oct 1, 2026): Thanks! Fixed for the next release with PR #398 (Bortlesboat): when input ends before an answer, setup stops with a clear message instead of taking the default; `--yes` still accepts the recommended answers. This issue closes with the release.
Author
Owner

@Niko1221 commented on GitHub (Oct 1, 2026):

Fixed in 0.1.33 with #398. Thanks!

<!-- gh-comment-id:5940772293 --> @Niko1221 commented on GitHub (Oct 1, 2026): Fixed in [0.1.33](https://github.com/Niko1221/Strata/releases/tag/v0.1.33) with #398. Thanks!
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#182
No description provided.