Checkupdates: Preserve pacman colors when printing the list of pending updates
The colors for the listing of pending updates are inherited from the "Color" option in /etc/pacman.conf
(since it uses pacman -Qu
to generate the list).
However, since the list is put into an array via a mapfile the colors are not preserved. Indeed, the "Color" option in /etc/pacman.conf
correspond to the --color auto
pacman flag which prints colors only when outputting onto in a TTY (which a mapfile/array is not
This commit makes checkupdates
forcing the use of --color always
during the pacman -Qu
command in the mapfile to generate the list of pending updates with colors for users that have the "Color" option enabled in the pacman.conf
.