On Sat, Mar 08, 2025 at 07:17:29AM -0800, Josh Triplett wrote:
Given that, the following command will reproduce this, and show the
output to the terminal:
systemd-run -P apt -y install wireshark-common </dev/null 2>&1 | cat
Thanks for the reproducer! That helps a lot.
I'm more inclined to do something like the attached patch; my feeling is
that it was probably a mistake that we put the `-t STDIN` check in
Readline rather than in Teletype, and I'd rather fix that than add an
additional prompt. What do you think? It works with your reproducer,
automatically falling back to Noninteractive.
--
Colin Watson (he/him) [cjwat...@debian.org]
diff --git a/Debconf/FrontEnd/Readline.pm b/Debconf/FrontEnd/Readline.pm
index 48eff168..e7c3f5ab 100644
--- a/Debconf/FrontEnd/Readline.pm
+++ b/Debconf/FrontEnd/Readline.pm
@@ -44,9 +44,6 @@ sub init {
$this->SUPER::init(@_);
- # Yeah, you need a controlling tty. Make sure there is one.
- -t STDIN || die gettext("This frontend requires a controlling tty.")."\n";
-
$Term::ReadLine::termcap_nowarn = 1; # Turn off stupid termcap warning.
$this->readline(Term::ReadLine->new('debconf'));
$this->readline->ornaments(1);
diff --git a/Debconf/FrontEnd/Teletype.pm b/Debconf/FrontEnd/Teletype.pm
index 9c1ad5b8..7ac6410a 100644
--- a/Debconf/FrontEnd/Teletype.pm
+++ b/Debconf/FrontEnd/Teletype.pm
@@ -41,6 +41,9 @@ sub init {
$this->SUPER::init(@_);
$this->interactive(1);
$this->linecount(0);
+
+ # Yeah, you need a controlling tty. Make sure there is one.
+ -t STDIN || die gettext("This frontend requires a controlling tty.")."\n";
}
=item display