We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 949b98c commit 386ca6aCopy full SHA for 386ca6a
src/bootstrap/bootstrap.py
@@ -1161,9 +1161,9 @@ def check_vendored_status(self):
1161
"""Check that vendoring is configured properly"""
1162
vendor_dir = os.path.join(self.rust_root, 'vendor')
1163
if 'SUDO_USER' in os.environ and not self.use_vendored_sources:
1164
- if os.environ.get('USER') != os.environ['SUDO_USER']:
+ if os.getuid() == 0:
1165
self.use_vendored_sources = True
1166
- print('info: looks like you are running this command under `sudo`')
+ print('info: looks like you\'re trying to run this command as root')
1167
print(' and so in order to preserve your $HOME this will now')
1168
print(' use vendored sources by default.')
1169
if not os.path.exists(vendor_dir):
0 commit comments