Skip to content

Commit b5fcca5

Browse files
authored
Auto merge of #37015 - ahmedcharles:sudo, r=alexcrichton
Prevent accidentally running 'make install' as sudo. r? @alexcrichton I missed this in the previous PR, but this seems to work. It should probably go in a rollup, but I don't know how to do those. :/
2 parents 195dbfa + f171d98 commit b5fcca5

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)