Skip to content

Fix ps.psaux and ps.lsof to raise CommandNotFoundError when binaries are missing#69814

Open
twangboy wants to merge 1 commit into
saltstack:3006.xfrom
twangboy:fix/65252/3006.x
Open

Fix ps.psaux and ps.lsof to raise CommandNotFoundError when binaries are missing#69814
twangboy wants to merge 1 commit into
saltstack:3006.xfrom
twangboy:fix/65252/3006.x

Conversation

@twangboy

Copy link
Copy Markdown
Contributor

What does this PR do?

On Windows, ps.psaux crashed with a raw WinError traceback because it shells out to ps aux with no guard. Add the same @path.which decorator already used by ps.netstat and ps.ss so both psaux and lsof fail with a clear CommandNotFoundError instead.

What issues does this PR fix or reference?

Fixes #65252

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

…are missing

On Windows, ps.psaux crashed with a raw WinError traceback because it shells
out to `ps aux` with no guard. Add the same @path.which decorator already
used by ps.netstat and ps.ss so both psaux and lsof fail with a clear
CommandNotFoundError instead.

Fixes saltstack#65252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant