Skip to content

Commit

Permalink
build: warn if make is started with superuser privileges
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Oct 28, 2023
1 parent 20204da commit 8912c05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8912c05

Please sign in to comment.