File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -438,14 +438,14 @@ def main():
438438 rb .use_vendored_sources = '\n vendor = true' in rb .config_toml or \
439439 'CFG_ENABLE_VENDOR' in rb .config_mk
440440
441- if 'SUDO_USER' in os .environ :
442- if os .environ [ 'USER' ] != os .environ ['SUDO_USER' ]:
441+ if 'SUDO_USER' in os .environ and not rb . use_vendored_sources :
442+ if os .environ . get ( 'USER' ) != os .environ ['SUDO_USER' ]:
443443 rb .use_vendored_sources = True
444444 print ('info: looks like you are running this command under `sudo`' )
445445 print (' and so in order to preserve your $HOME this will now' )
446446 print (' use vendored sources by default. Note that if this' )
447447 print (' does not work you should run a normal build first' )
448- print (' before running a command like `sudo make intall `' )
448+ print (' before running a command like `sudo make install `' )
449449
450450 if rb .use_vendored_sources :
451451 if not os .path .exists ('.cargo' ):
You can’t perform that action at this time.
0 commit comments