diff options
| author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-02-02 22:28:00 +0100 |
|---|---|---|
| committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-02-02 22:28:00 +0100 |
| commit | 8e793eb3c64e289d4fa5850bf28d10fe5b3e062a (patch) | |
| tree | d6e0f6b19600089d6737f30aee7120e65d45de42 /src | |
| parent | a0efdf34417b5564a7474e8c2175b9e643640b8f (diff) | |
| download | rust-8e793eb3c64e289d4fa5850bf28d10fe5b3e062a.tar.gz rust-8e793eb3c64e289d4fa5850bf28d10fe5b3e062a.zip | |
Guard against USER not existing in the environment
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 2 |
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') |
