|
|
@@ -574,9 +574,14 @@ EOF
|
|
|
fi
|
|
|
log_info "Installing $(echo "$missing" | wc -l) missing package(s):"
|
|
|
echo "$missing" | sed 's/^/ /'
|
|
|
- # Pass targets as arguments rather than piping to stdin: yay opens
|
|
|
- # /dev/tty for its prompts, and feeding it stdin breaks that.
|
|
|
- echo "$missing" | xargs -r yay -S --needed
|
|
|
+ # Build an argv array and invoke yay directly -- no pipe, no xargs.
|
|
|
+ # yay is interactive (cleanBuild, conflict and diff prompts), so it
|
|
|
+ # needs to inherit the terminal's stdin. Piping to it steals stdin;
|
|
|
+ # xargs is worse, because it points the child's stdin at /dev/null
|
|
|
+ # and every prompt immediately reads EOF.
|
|
|
+ local -a pkgs
|
|
|
+ mapfile -t pkgs <<< "$missing"
|
|
|
+ yay -S --needed "${pkgs[@]}"
|
|
|
;;
|
|
|
diff)
|
|
|
if [[ -n "$missing" ]]; then
|