The command after && runs only if the previous command returns non-error exit status (0), if pacman returns error the latter command won’t be executed.
Additionally there’s probably a configuration option for sudo for it to not time out, but it doesn’t matter since you can just use systemctl reboot as a normal user to reboot your system (at least on Debian). If that’s too long I recommend to add this to your .bashrc (if you use Bash): alias reb='systemctl reboot' or something similar.
Maybe this is just a yay thing but I think if sudo priveleges run out while downloading the files it prompts you for your password again before performing the changes. That would lead to it either trying to use the yes output or getting stuck in the password prompt, only failing in the prior.
This entire problem could be solved by just running it as the root user.
The command after
&&runs only if the previous command returns non-error exit status (0), ifpacmanreturns error the latter command won’t be executed.Additionally there’s probably a configuration option for
sudofor it to not time out, but it doesn’t matter since you can just usesystemctl rebootas a normal user to reboot your system (at least on Debian). If that’s too long I recommend to add this to your.bashrc(if you use Bash):alias reb='systemctl reboot'or something similar.Maybe this is just a
yaything but I think if sudo priveleges run out while downloading the files it prompts you for your password again before performing the changes. That would lead to it either trying to use theyesoutput or getting stuck in the password prompt, only failing in the prior.This entire problem could be solved by just running it as the root user.