diff options
Diffstat (limited to 'backend/localplatformwin.py')
| -rw-r--r-- | backend/localplatformwin.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/backend/localplatformwin.py b/backend/localplatformwin.py index 3242403b..b6bee330 100644 --- a/backend/localplatformwin.py +++ b/backend/localplatformwin.py @@ -35,4 +35,19 @@ async def service_restart(service_name : str) -> bool: return True # Stubbed def get_username() -> str: - return os.getlogin()
\ No newline at end of file + return os.getlogin() + +def get_privileged_path() -> str: + '''On windows, privileged_path is equal to unprivileged_path''' + return get_unprivileged_path() + +def get_unprivileged_path() -> str: + path = os.getenv("UNPRIVILEGED_PATH") + + if path == None: + path = os.getenv("PRIVILEGED_PATH", os.path.join(os.path.expanduser("~"), "homebrew")) + + return path + +def get_unprivileged_user() -> str: + return os.getenv("UNPRIVILEGED_USER", os.getlogin()) |
