From 4c75eb34c484c006f4c98d45dc630a3d368e1f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Wed, 17 Mar 2021 04:52:54 +0000 Subject: [PATCH] Obtain username in root, since cwd might not exist. --- ognibuild/session/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ognibuild/session/__init__.py b/ognibuild/session/__init__.py index 23021c1..cebe227 100644 --- a/ognibuild/session/__init__.py +++ b/ognibuild/session/__init__.py @@ -91,4 +91,4 @@ def run_with_tee(session: Session, args: List[str], **kwargs): def get_user(session): - return session.check_output(["echo", "$USER"]).decode().strip() + return session.check_output(["echo", "$USER"], cwd="/").decode().strip()