From 5e47082effb9cf2afcd88a3c668b465d552a4c6a Mon Sep 17 00:00:00 2001 From: Artur Troian Date: Sat, 28 Oct 2023 09:36:05 -0400 Subject: [PATCH] build: warn if make is started with superuser privileges (#87) 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