From 6397dd8f360940da69442b75b8544ae62a9e0b79 Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Mon, 13 Aug 2018 11:22:16 +0000 Subject: [PATCH] [build]: print error message when use root or sudo to build. Signed-off-by: Guohan Lu --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index c5c5d59620c8..2dfab3274869 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,10 @@ SHELL = /bin/bash USER := $(shell id -un) 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 $(shell rm -f .screen)