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)