From 5ec66315ebbc031fdebfd489eed90685bb44d866 Mon Sep 17 00:00:00 2001 From: xaizek Date: Wed, 18 Jun 2025 20:45:44 +0300 Subject: [PATCH] Makefile: silence errors from git git commands are run during build of the module by DKMS when there is no git repository, that error output look confusing. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 08ff1b7..9ddcc8d 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,8 @@ obj-m += nct6687.o curpwd := $(shell pwd) kver ?= $(shell uname -r) -commitcount := $(shell git rev-list --all --count) -commithash := $(shell git rev-parse --short HEAD) +commitcount := $(shell git rev-list --all --count 2>/dev/null) +commithash := $(shell git rev-parse --short HEAD 2>/dev/null) fedoraver := $(shell sed -n 's/.*Fedora release \([^ ]*\).*/\1/p' /etc/fedora-release 2>/dev/null || echo 0)