diff --git a/python/packaging/frontend_sdist/setup.py b/python/packaging/frontend_sdist/setup.py index ef54feeb0..aacb696f3 100644 --- a/python/packaging/frontend_sdist/setup.py +++ b/python/packaging/frontend_sdist/setup.py @@ -69,11 +69,9 @@ def parent_command_line(): pass # fall back to shell try: - return ( - subprocess.check_output(["ps", "-p", str(pid), "-o", "command"]) - .decode() - .split("\n")[1] - ) + return subprocess.check_output( + ["ps", "-p", str(pid), "-o", "command", "--no-headers"] + ).decode() except subprocess.CalledProcessError: return ""