From 7775a7d5b0906c36f59ad171fbb910932ec04b49 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" <1330696+mr-c@users.noreply.github.com> Date: Fri, 2 Dec 2022 14:05:52 +0100 Subject: [PATCH] Workaround for users with an empty fullname --- cwltool/provenance.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cwltool/provenance.py b/cwltool/provenance.py index 7c7e38cfd..498ef57ff 100644 --- a/cwltool/provenance.py +++ b/cwltool/provenance.py @@ -79,9 +79,12 @@ def _whoami() -> Tuple[str, str]: """Return the current operating system account as (username, fullname).""" username = getuser() + fullname = "" try: fullname = pwd.getpwuid(os.getuid())[4].split(",")[0] except (KeyError, IndexError): + pass + if fullname == "": fullname = username return (username, fullname)