about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/bootstrap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 958ffd11008..3869b286102 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -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')