From 8912c05cb8330c4c7932a4db19e684cc14adb0b9 Mon Sep 17 00:00:00 2001 From: Artur Troian Date: Sat, 28 Oct 2023 09:31:49 -0400 Subject: [PATCH] build: warn if make is started with superuser privileges Signed-off-by: Artur Troian --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 0657aac7..d2e1f6ab 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,10 @@ UNAME_OS := $(shell uname -s) UNAME_ARCH := $(shell uname -m) PROTO_LEGACY ?= true +ifeq (0, $(shell id -u)) +$(warning "make was started with superuser privileges. it may cause issues with direnv") +endif + ifeq (, $(shell which direnv)) $(error "No direnv in $(PATH), consider installing. https://direnv.net") endif