runshell: Fix a edge case where rm errors were sent to stdout, which could confuse things parsing git-annex output.

This commit is contained in:
Joey Hess 2020-10-05 12:44:40 -04:00
parent 3363cc7515
commit cd9a60bc7d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 12 additions and 1 deletions

View file

@ -143,7 +143,7 @@ if [ -z "${LOCPATH+set}" ] && [ -z "$GIT_ANNEX_PACKAGE_INSTALL" ]; then
for localecache in $HOME/.cache/git-annex/locales/*; do
cachebase=$(cat "$localecache/base" 2>/dev/null || true)
if [ ! -d "$cachebase" ] || ! cmp "$localecache/buildid" "$cachebase/buildid" >/dev/null 2>&1 ; then
rm -rf "$localecache" 2>&1 || true
rm -rf "$localecache" >/dev/null 2>&1 || true
fi
done