From 14fe1c2f1b62b07fc655a45b53b059cb5f5c54de Mon Sep 17 00:00:00 2001 From: "Yury V. Zaytsev" Date: Wed, 9 Oct 2024 09:34:45 +0200 Subject: [PATCH] Ticket #4596: don't suppress `command -v` output for variable assignments Signed-off-by: Yury V. Zaytsev --- src/vfs/extfs/helpers/iso9660.in | 4 ++-- src/vfs/extfs/helpers/u7z | 8 ++++---- src/vfs/extfs/helpers/urar.in | 2 +- src/vfs/extfs/helpers/uwim.in | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vfs/extfs/helpers/iso9660.in b/src/vfs/extfs/helpers/iso9660.in index 1ee5cc8bfd..55a79c9ff2 100644 --- a/src/vfs/extfs/helpers/iso9660.in +++ b/src/vfs/extfs/helpers/iso9660.in @@ -32,7 +32,7 @@ #*** file scope functions ********************************************** -XORRISO=$(command -v xorriso >/dev/null 2>&1) +XORRISO=$(command -v xorriso 2>/dev/null) # This snippet is used to undo xorriso's Text_shellsafe(). Pseudocode for the # function: @@ -143,7 +143,7 @@ xorriso_rm() { # tested to comply with isoinfo 2.0's output test_iso () { - ISOINFO=$(command -v isoinfo >/dev/null 2>&1) + ISOINFO=$(command -v isoinfo 2>/dev/null) if test -z "$ISOINFO"; then echo "isoinfo not found" >&2 return 1 diff --git a/src/vfs/extfs/helpers/u7z b/src/vfs/extfs/helpers/u7z index 6d3a4ccfa2..ddf9360b36 100755 --- a/src/vfs/extfs/helpers/u7z +++ b/src/vfs/extfs/helpers/u7z @@ -17,10 +17,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -P7ZIP=`command -v 7z >/dev/null 2>&1` \ - || P7ZIP=`command -v 7zz >/dev/null 2>&1` \ - || P7ZIP=`command -v 7za >/dev/null 2>&1` \ - || P7ZIP=`command -v 7zr >/dev/null 2>&1` \ +P7ZIP=`command -v 7z 2>/dev/null` \ + || P7ZIP=`command -v 7zz 2>/dev/null` \ + || P7ZIP=`command -v 7za 2>/dev/null` \ + || P7ZIP=`command -v 7zr 2>/dev/null` \ || P7ZIP="" # Let the test framework hook in: diff --git a/src/vfs/extfs/helpers/urar.in b/src/vfs/extfs/helpers/urar.in index d589ece179..78753ada75 100644 --- a/src/vfs/extfs/helpers/urar.in +++ b/src/vfs/extfs/helpers/urar.in @@ -16,7 +16,7 @@ RAR=rar # Prefer unrar (freeware). -UNRAR=`command -v unrar >/dev/null 2>&1` +UNRAR=`command -v unrar 2>/dev/null` [ -z $UNRAR ] && UNRAR=$RAR [ ! -x $UNRAR -a -x $RAR ] && UNRAR=$RAR diff --git a/src/vfs/extfs/helpers/uwim.in b/src/vfs/extfs/helpers/uwim.in index bb8fa34c2d..067ee986f3 100644 --- a/src/vfs/extfs/helpers/uwim.in +++ b/src/vfs/extfs/helpers/uwim.in @@ -11,7 +11,7 @@ # apt install wimtools command -v wimlib-imagex >/dev/null 2>&1 || exit 1 -WIM=`command -v wimlib-imagex >/dev/null 2>&1` +WIM=`command -v wimlib-imagex 2>/dev/null` AWK=@AWK@ [ -n "$2" ] || exit 1