shutils/pkgtarget: don't spam stderr with expected rm errors

Since the first `rm -rf` command is allowed/expected to fail, hide its
output. This was missed with the initial optimization in
d7bf8e06a0.
This commit is contained in:
Érico Nogueira 2021-05-14 16:10:09 -03:00
parent e2e356a65f
commit 47dae4b67d

View file

@ -79,7 +79,7 @@ remove_pkg_autodeps() {
remove_pkg_wrksrc() {
if [ -d "$wrksrc" ]; then
msg_normal "$pkgver: cleaning build directory...\n"
rm -rf "$wrksrc" || chmod -R +wX "$wrksrc" # Needed to delete Go Modules
rm -rf "$wrksrc" 2>/dev/null || chmod -R +wX "$wrksrc" # Needed to delete Go Modules
rm -rf "$wrksrc"
fi
}