Skip to content

Commit

Permalink
Guard against USER not existing in the environment
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Feb 2, 2017
1 parent a0efdf3 commit 8e793eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/bootstrap.py
Expand Up @@ -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')
Expand Down

0 comments on commit 8e793eb

Please sign in to comment.