Guard against USER not existing in the environment
This commit is contained in:
parent
a0efdf3441
commit
8e793eb3c6
1 changed files with 1 additions and 1 deletions
|
|
@ -439,7 +439,7 @@ def main():
|
|||
'CFG_ENABLE_VENDOR' in rb.config_mk
|
||||
|
||||
if 'SUDO_USER' in os.environ and not rb.use_vendored_sources:
|
||||
if os.environ['USER'] != os.environ['SUDO_USER']:
|
||||
if os.environ.get('USER') != os.environ['SUDO_USER']:
|
||||
rb.use_vendored_sources = True
|
||||
print('info: looks like you are running this command under `sudo`')
|
||||
print(' and so in order to preserve your $HOME this will now')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue