From: Ben Crocker <bcrocker(a)redhat.com>
Use test -x instead of dnf to test for presence of bats.
Signed-off-by: Ben Crocker <bcrocker(a)redhat.com>
---
redhat/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/redhat/Makefile b/redhat/Makefile
index 555dea25ea0f..e7ba07066177 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -393,7 +393,7 @@ dist-dump-variables:
@$(REDHAT)/dist-dump-variables.sh
dist-self-test:
- @if dnf list installed bats >& /dev/null; then \
+ @if test -x /usr/bin/bats >& /dev/null; then \
bats $(REDHAT)/self-test/*.bats ; \
else \
echo "dist-self-test: The bats package is not installed" ; \
--
GitLab