Allows installation as root user

* Allows root to install OpenCafe. This is necessary for running
  OpenCafe in Docker

Change-Id: Ia56ca03d156c4dfbde06087568517e8e7dfd7a4f
This commit is contained in:
Daryl Walleck
2014-02-03 17:25:19 -06:00
parent dbc8efc487
commit ab8b116605

View File

@@ -45,10 +45,9 @@ class PlatformManager(object):
effective_user = os.getenv("USER")
if not cls.USING_WINDOWS and not cls.USING_VIRTUALENV:
if effective_user == 'root' and real_user != 'root':
if effective_user == 'root' and real_user not in ['root', None]:
# Running 'sudo'.
return real_user
elif cls.USING_WINDOWS:
return getpass.getuser()