Skip to content

Commit f171d98

Browse files
committed
Prevent accidentally running 'make install' as sudo.
1 parent 75c155b commit f171d98

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bootstrap/mk/Makefile.in

+4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ check-cargotest:
5252
dist:
5353
$(Q)$(BOOTSTRAP) --step dist
5454
install:
55+
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
56+
$(Q)echo "'sudo make install' is not supported currently."
57+
else
5558
$(Q)$(BOOTSTRAP) --step install
59+
endif
5660
tidy:
5761
$(Q)$(BOOTSTRAP) --step check-tidy --stage 0
5862

0 commit comments

Comments
 (0)