…teps
Two setup steps ask before installing something on the user's machine: the
valgrind-codspeed source build, for the distributions we publish no package
for, and the Homebrew bash samply needs on macOS, since the Apple-signed
/bin/bash cannot be profiled.
Each carried its own copy of the same logic: skip the question with no TTY,
print the explanation and the question on stderr, read a line, count an empty
answer as a yes. Move both onto confirm_default_yes, taking the valgrind prompt
as the reference implementation.
The macOS question is now asked with the progress bar suspended, so a running
spinner can no longer overwrite it. Everything else keeps its shape: the
valgrind caller still decides on CODSPEED_VALGRIND_BUILD_FROM_SOURCE first and
treats a decline as a legitimate answer, the macOS one still fails on a
decline.
Closes COD-3537
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two setup steps ask before installing something on the user's machine: the valgrind-codspeed source build, for the distributions we publish no package for, and the Homebrew bash samply needs on macOS, since the Apple-signed
/bin/bashcannot be profiled. Each carried its own copy of the same logic — skip the question with no TTY, print the explanation and the question on stderr, read a line, count an empty answer as a yes.Both now go through
confirm_default_yes, taking the valgrind prompt as the reference implementation. The only behaviour change is on macOS: the question is asked with the progress bar suspended, so a running spinner can no longer overwrite it. The valgrind caller still decides onCODSPEED_VALGRIND_BUILD_FROM_SOURCEfirst and treats a decline as a legitimate answer; the macOS one still fails on a decline.The macOS prompt was not exercised by hand —
macos-basic-run-testcovers the compile, and its runner has no TTY, so it takes the accept-without-asking path.Closes COD-3537