-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: correctly parse ps
output on linux
#1389
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 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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