mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
paccache: avoid subshell in calling runcmd
Avoids problems with one of the worst CLI tools ever created, su. Fixes FS#34656. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
695f0e443e
commit
597286eb25
@ -308,9 +308,9 @@ totalsaved=$(@SIZECMD@ "${candidates[@]}" | awk '{ sum += $1 } END { print sum }
|
|||||||
# crush. kill. destroy.
|
# crush. kill. destroy.
|
||||||
(( verbose )) && cmdopts+=(-v)
|
(( verbose )) && cmdopts+=(-v)
|
||||||
if (( delete )); then
|
if (( delete )); then
|
||||||
printf '%s\0' "${candidates[@]}" | runcmd xargs -0 rm "${cmdopts[@]}"
|
runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") rm "${cmdopts[@]}"
|
||||||
elif (( move )); then
|
elif (( move )); then
|
||||||
printf '%s\0' "${candidates[@]}" | runcmd xargs -0 mv "${cmdopts[@]}" -t "$movedir"
|
runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") mv "${cmdopts[@]}" -t "$movedir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
summarize "$pkgcount" "${candidates[@]}"
|
summarize "$pkgcount" "${candidates[@]}"
|
||||||
|
Loading…
Reference in New Issue
Block a user