Small fix to easy Linux installer, don't install to root
This commit is contained in:
parent
0e5dddd31d
commit
2c8f87a0c6
1 changed files with 3 additions and 0 deletions
|
@ -17,6 +17,9 @@ _HOME = os.environ['HOME']
|
||||||
_USER = os.environ['SUDO_USER']
|
_USER = os.environ['SUDO_USER']
|
||||||
_UID = int(os.environ['SUDO_UID'])
|
_UID = int(os.environ['SUDO_UID'])
|
||||||
_GID = int(os.environ['SUDO_GID'])
|
_GID = int(os.environ['SUDO_GID'])
|
||||||
|
# fix home if it's root weirdness
|
||||||
|
if _HOME.find("root") != -1:
|
||||||
|
_HOME = "/home/"+_USER
|
||||||
|
|
||||||
def setPermissions(path):
|
def setPermissions(path):
|
||||||
os.chown(path, _UID, _GID)
|
os.chown(path, _UID, _GID)
|
||||||
|
|
Loading…
Reference in a new issue