Fix issue #58 and issue #42: crashes on Windows 11 24H2 and wrong results on processes with spaces in name#62
Fix issue #58 and issue #42: crashes on Windows 11 24H2 and wrong results on processes with spaces in name#62BePo65 wants to merge 2 commits intoindexzero:masterfrom
Conversation
…windows systems)
Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
|
Running build/tests on |
|
Any chance this can get looked at? I'm starting to see failures on new regular Windows installs from ps-tree now that wmic isn't included by default, so it's going to start affecting significantly more people soon. |
nelsonic
left a comment
There was a problem hiding this comment.
Code updates LGTM. 👌
Could you please add a windows-specific test that will run on GitHub Actions CI to confirm this us working and avoid future regressions when something changes.
https://github.com/indexzero/ps-tree/pull/62/checks already shows successful tests on Windows The branch BePo65:pu/issue58 needs to be rebased on the Before any more work is done on this repo there needs to be confirmation from the owner @indexzero that there will be a possibility to release a new version, otherwise there is no real benefit from any fixes. I checked that this branch runs successfully on |
Solves issue #58 : On windows systems ps-tree uses WMIC to get the list of child processes. WMIC is deprecated since 2016. This PR replaces WMIC with powershell (as recommended by Microsoft),
I encountered this problem, when using the start-server-and-run package (see bahmutov/start-server-and-test#384).
Solves issue #42 - ps-treee returns wrong results when process name contains spaces (primarily on windows systems). Issue is caused by splitting a row into columns on spaces. Fixed by getting the column widths, when extracting the headers (all columns have fixed width).