FS#67392 - Make cancelled confirmation prompts more obvious
|
Details
Summary and Info:
Recently I've seen multiple people bump into an issue using Pacman in automation. Seems like there's no indication of a confirmation prompt causing Pacman to bail out when stdin is closed. The solution in most cases is to add `--noconfirm`, but it's not obvious anything is wrong when reading the logs. I'm thinking of two options: 1. a specialized message like "No answer, defaulting to No." for just this case of feof(stdin) 2. a general "Installation/upgrade/whatever was cancelled." (one would have to be written for each prompt) that would also be seen by interactive users Either one should make the quits more obvious in the logs. Steps to Reproduce: ``` $ cat /dev/null | sudo pacman -Sc Packages to keep: All locally installed packages Cache directory: /var/cache/pacman/pkg/ :: Do you want to remove all other packages from cache? [Y/n] Database directory: /var/lib/pacman/ :: Do you want to remove unused repositories? [Y/n] ``` |
This task depends upon
nonzero exit, even a message - "Failed to retrieve input from stdin" or something