1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 00:08:50 -05:00

Fix stderr redirection

When redirecting both stderr and stdout and using the 2>&1 construct,
you have to redirect stdout first. Otherwise stderr will be redirected to
the 'old' stdout and not to the new resource.

Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Cedric Staniewski 2009-05-12 10:59:34 +02:00 committed by Dan McGee
parent ab3c6f01f5
commit c7d8601e12

View File

@ -357,7 +357,7 @@ add()
fi
pkgfile=$1
if ! bsdtar -tqf "$pkgfile" .PKGINFO 2>&1 >/dev/null; then
if ! bsdtar -tqf "$pkgfile" .PKGINFO >/dev/null 2>&1; then
error "$(gettext "'%s' is not a package file, skipping")" "$pkgfile"
return 1
fi