summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-04-11 15:18:47 +0200
committerAllan McRae <allan@archlinux.org>2013-04-12 01:42:43 +0200
commit597286eb258f841dfc00f65474138fc6192f0092 (patch)
tree33667527548588565f3e7dc7bfcc67561431d9f8
parent695f0e443e18ca5d7b722bdf2c4695cc63c1af54 (diff)
downloadpacman-597286eb258f841dfc00f65474138fc6192f0092.tar.gz
pacman-597286eb258f841dfc00f65474138fc6192f0092.tar.xz
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>
-rw-r--r--contrib/paccache.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/paccache.sh.in b/contrib/paccache.sh.in
index c3312733..64c3c536 100644
--- a/contrib/paccache.sh.in
+++ b/contrib/paccache.sh.in
@@ -308,9 +308,9 @@ totalsaved=$(@SIZECMD@ "${candidates[@]}" | awk '{ sum += $1 } END { print sum }
# crush. kill. destroy.
(( verbose )) && cmdopts+=(-v)
if (( delete )); then
- printf '%s\0' "${candidates[@]}" | runcmd xargs -0 rm "${cmdopts[@]}"
+ runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") rm "${cmdopts[@]}"
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
summarize "$pkgcount" "${candidates[@]}"