Skip to content

Commit

Permalink
Add --no-headers to ps command
Browse files Browse the repository at this point in the history
Signed-off-by: ddelange <[email protected]>
  • Loading branch information
ddelange committed Jul 6, 2023
1 parent 6458be2 commit e89d6b5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions python/packaging/frontend_sdist/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

Expand Down

0 comments on commit e89d6b5

Please sign in to comment.