-
-
Notifications
You must be signed in to change notification settings - Fork 30
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 incorrect process name cutting on macos #55
Conversation
I'm so sorry, I found my patch was totally wrong. Using replaceAll with incorrect regexp (should be with g flag) caused TypeError and the error called The cutting is not caused by fkill's logic, it is by For example, I found
I found this posting, https://unix.stackexchange.com/questions/401780/ps-cuts-command-how-to-get-full This posting said to swap the argument order, but it didn't work since I think maybe the sole solution here is calling It increases the runtime cost, but still better than calling If you agree, I will try to edit this patch in this direction. |
Yes, that is correct. I should never have merged 285f434 |
eaa97b2
to
2800dfa
Compare
args length would be more longer than comm's one
Have you tested these changes with |
Yes, and I also have tested below simple test code. import psList from './index.js';
console.log(await psList({all: true})); |
I found
ps-list
returns incorrect process name while working on sindresorhus/fkill-cli#83I think it is broken in ps-list@7.0.0 (https://github.com/sindresorhus/ps-list/blob/v7.0.0/index.js#L125).
This PR will fix sindresorhus/fkill-cli#78.
Only tested in macOS yet.
Before
After
Fixes #49