Skip to content
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

Inaccurately matches against other ports for unix. #67

Open
AndrewSouthpaw opened this issue Sep 19, 2022 · 0 comments
Open

Inaccurately matches against other ports for unix. #67

AndrewSouthpaw opened this issue Sep 19, 2022 · 0 comments

Comments

@AndrewSouthpaw
Copy link

AndrewSouthpaw commented Sep 19, 2022

Repro:

Run lsof -i -P and pick a port that is running where no substring of the port is running, e.g.

Google    62775 andrew   89u  IPv4 ...  TCP 192.168.0.0:49302->...:443 (ESTABLISHED)
# no port 9302

Then run kill-port 9302, it prints:

$ npx kill-port 9302
Process on port 9302 killed

This is because the regex is incorrect:

https://github.com/tiaanduplessis/kill-port/blob/master/index.js#L39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant