From 44c76481e75342b6f9e1994d1bb7f83575341c55 Mon Sep 17 00:00:00 2001 From: Michal Domonkos Date: Thu, 10 Aug 2023 17:38:19 +0200 Subject: [PATCH] Clean up dnf() function in "make env" The "function" keyword is not needed (not POSIX either) and which(1) is better than hardcoding the path. No functional change. --- tests/mktree.fedora | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/mktree.fedora b/tests/mktree.fedora index 28035eca11..1489e77ede 100755 --- a/tests/mktree.fedora +++ b/tests/mktree.fedora @@ -145,9 +145,7 @@ case $CMD in env) set -a mount_tree $SANDBOX_DIR - function dnf() { - /usr/bin/dnf --installroot=$RPMTEST "$@" - } + dnf() { $(which dnf) --installroot=$RPMTEST "$@"; } echo "$ENV_MOTD" $SHELL exit 0