Skip to content

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

Closed

Description

@Efs-O

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.

Activity

  1. Niko1221 commented on Oct 1, 2026

    @Niko1221
    Owner

    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.

  2. added a commit that references this issue on Oct 1, 2026
  3. Niko1221 commented on Oct 1, 2026

    @Niko1221
    Owner

    Fixed in 0.1.33 with #398. Thanks!

  4. added a commit that references this issue on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions