Obtain username in root, since cwd might not exist.

This commit is contained in:
Jelmer Vernooij 2021-03-17 04:52:54 +00:00
parent d46f45debc
commit 4c75eb34c4
No known key found for this signature in database
GPG key ID: 579C160D4C9E23E8

View file

@ -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()