[build]: print error message when use root or sudo to build. (#1923)
Signed-off-by: Guohan Lu <gulv@microsoft.com>
This commit is contained in:
parent
40bb27ca1c
commit
e15cf2d66a
4
Makefile
4
Makefile
@ -25,6 +25,10 @@ SHELL = /bin/bash
|
|||||||
USER := $(shell id -un)
|
USER := $(shell id -un)
|
||||||
PWD := $(shell pwd)
|
PWD := $(shell pwd)
|
||||||
|
|
||||||
|
ifeq ($(USER), root)
|
||||||
|
$(error Add your user account to docker group and use your user account to make. root or sudo are not supported!)
|
||||||
|
endif
|
||||||
|
|
||||||
# Remove lock file in case previous run was forcefully stopped
|
# Remove lock file in case previous run was forcefully stopped
|
||||||
$(shell rm -f .screen)
|
$(shell rm -f .screen)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user