Package: whiptail
Version: 0.52.21-5

Since Debian Bookworm, it is not possible anymore to control whiptail dialogs when being passed through a sudo pipe to the shell, e.g.:
-------
echo 'whiptail --msgbox test 20 80' | sudo bash
-------
This is often used when executing remote installer shell scripts, like:
-------
curl -sSfL https://install.something.org | sudo bash
-------
Whether using bash or dash or another shell to pipe the command(s) to and/or as parent shell to call the whole pipe from, doesn't matter. The same works well on Debian Bullseye and before.

The following cases work without issues, either omitting sudo, using a command substitution instead of a pipe (leaving STDIN untouched) or using "dialog" instead of whiptail:
-------
echo 'whiptail --msgbox test 20 80' | bash
sudo bash -c "$(echo 'whiptail --msgbox test 20 80')"
echo 'dialog --msgbox test 20 80' | sudo bash
-------

I'm not sure whether something changed in sudo, in whiptail/newt (nothing visible in changelog) or in some other used system library. But since it is affecting a common use case for whiptail explicitly, I'm reporting it here. It generally seems to be related to how STDIN is handled through shell pipes and sudo and how whiptail uses it (given that "dialog" is not affected).

Best regards,

Micha

Reply via email to