`ask_to_run` is asking the user a question, therefore it should read and writing from `/dev/tty` rather than stdin/stdout, which may be redirected. If opening `/dev/tty` fails, that should trigger `--noninteractive` mode (see #419).