fix: correctly parse ps output on linux#1389
Conversation
|
@microsoft-github-policy-service agree |
command and arguments are separated by space. previously, if space wasn't found, function would have skipped this process. Now, processes processes without args yields arguments as empty string
|
Notice, that checks for existence of |
|
@owl-from-hogvarts thanks for your contribution. Since the processTree.ts implementation is originally copied from https://github.com/microsoft/vscode-node-debug/blob/main/src/node/extension/processTree.ts, I'm wondering if updating to the latest version from that source would slove your issue? |
|
@testforstephen Latest version of original file works. But notice, that it uses deprecated |
We can replace the deprecated |
|
Seems meaningful. So, it is now up to you to do code review and choose implementation 😉 |
|
Hey! Who's willing to review this PR?) Two weeks have passed. This still need merge. Just a friendly reminder 😉 |
don't use deprecated `substr` method
|
The file now uses original approach. Code readability enhanced |
I can't imagine how this could happen, but since old code does this, why not 🤷♂️
testforstephen
left a comment
There was a problem hiding this comment.
LGTM. thanks for contribution.
Fixes #1388
The issue was that
ps's output was parsed by hardcoded indexes. The parsing function had been written three years ago. Obviously, ps output format has slightly changed. So I have written regex to parse it more in more flexible fashion. Tested on mine machine. Works grate