Skip to content

Commit 8e793eb

Browse files
committed
Guard against USER not existing in the environment
1 parent a0efdf3 commit 8e793eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/bootstrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def main():
439439
'CFG_ENABLE_VENDOR' in rb.config_mk
440440

441441
if 'SUDO_USER' in os.environ and not rb.use_vendored_sources:
442-
if os.environ['USER'] != os.environ['SUDO_USER']:
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')

0 commit comments

Comments
 (0)