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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user