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

feat: attempt to autodetect need for -N switch to nc #3

Merged
merged 1 commit into from
Jun 20, 2020
Merged

Conversation

wincent
Copy link
Owner

@wincent wincent commented Jun 19, 2020

Based on discussion here:

#2

@wincent
Copy link
Owner Author

wincent commented Jun 19, 2020

Can you test this out and see if it works for you @xiruizhao?

I'm not a fan of the complexity here, but we have a choice:

  1. Do nothing (ie. leave code as it was before; maybe try to improve the docs).
  2. Do what this PR does (ie. "sniff" output of nc -h to try and figure out whether to pass the -N switch); I don't have a Ubuntu-ish machine to test this on, so I don't even know if it works.
  3. Maintain a list of operating systems and check against that with uname; not a fan of that approach because people can install different tools irrespective of their OS, and the check could become quite unwieldy (for example, checking for "Linux" won't cut it because some distros — eg. Amazon Linux, which I was able to test — don't require or support -N).

@xiruizhao
Copy link

Works on Ubuntu. I think this PR is the best solution. You can also update the README of clipper to warn people (so that they can take care of their .bashrc).

@wincent wincent merged commit 8100b48 into master Jun 20, 2020
@wincent wincent deleted the autodetect branch June 20, 2020 13:11
@wincent
Copy link
Owner Author

wincent commented Jun 20, 2020

Thanks for testing it @xiruizhao. Will give it a shot (merged).

wincent added a commit to wincent/clipper that referenced this pull request Jun 20, 2020
@wincent
Copy link
Owner Author

wincent commented Jun 20, 2020

Doc updates here: wincent/clipper@451bac8

@wincent wincent restored the autodetect branch June 20, 2020 14:01
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

Successfully merging this pull request may close these issues.

2 participants