-
Notifications
You must be signed in to change notification settings - Fork 90
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
Adding -H (Header) as a global option #115
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed the CLA.
…On Thu, Apr 19, 2018 at 2:24 PM, googlebot ***@***.***> wrote:
Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project (if not, look below for help).
Before we can look at your pull request, you'll need to sign a Contributor
License Agreement (CLA).
📝 *Please visit https://cla.developers.google.com/
<https://cla.developers.google.com/> to sign.*
Once you've signed (or fixed any issues), please reply here (e.g. I
signed it!) and we'll verify it.
------------------------------
What to do if you already signed the CLA Individual signers
- It's possible we don't have your GitHub username or you're using a
different email address on your commit. Check your existing CLA data
<https://cla.developers.google.com/clas> and verify that your email is
set on your git commits
<https://help.github.com/articles/setting-your-email-in-git/>.
Corporate signers
- Your company has a Point of Contact who decides which employees are
authorized to participate. Ask your POC to be added to the group of
authorized contributors. If you don't know who your Point of Contact is,
direct the Google project maintainer to go/cla#troubleshoot (Public
version <https://opensource.google.com/docs/cla/#troubleshoot>).
- The email used to register you as an authorized contributor must be
the email used for the Git commit. Check your existing CLA data
<https://cla.developers.google.com/clas> and verify that your email is
set on your git commits
<https://help.github.com/articles/setting-your-email-in-git/>.
- The email used to register you as an authorized contributor must
also be attached to your GitHub account
<https://github.com/settings/emails>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#115 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AdgNpPMPRa_PWiXTe0cGRP88__-pDic-ks5tqNZUgaJpZM4TcRhj>
.
|
CLAs look good, thanks! |
Added a fix. It appears the intent of the help output was to show required when the option must be included on the command line. Although this wasn't the behavior. Before (fetchproxy -help example) , if the option was required and the program prompted for it, it would show as required, which is was, but not on the command line. Other required options, not prompted for, like API or Organization, were listed in the help as optional. This is confusing, because supplying only username and password still resulted in an error message identifying the required options. After: if the option is required and not prompted for (false) or prompt is undefined, then the program will not obtain the value and should fail, therefore, the options should be listed as required (for the command line). If the option is required and prompted for, i.e. prompt: true, then it's still optional on the command line,, because it will prompt. If the option isn't required, it's optional. Changing the test on prompt to a NOT test, fixes the behavior. |
LGTM except can you add a note in the READ.md for the flag. It should go in the Thanks |
Made the update |
Looks good just need to remove |
Done. Didn't think on the git status and used the git add . by mistake. |
Thanks for checking. |
LGTM, thanks for the addition! |
Our team would like to make use of the apigeetool; however, we're behind a company proxy and need to provide authorization to get out to the internet and hit the api.enterprise.apigee.com endpoint. CNTLM is an option for local development environments, but doesn't work well in CI pipelines.
I added two changes:
Added a global -H header option to provide additional headers from the command line.
Extended the option descriptors to allow multiples and updated the option parsing code to push multiple option values onto an array. I did not alter defaults.js to consume multiples on any options other than header. I left that as a change awaiting a use case that needed multiples on other options.
So these changes should be fully compatible with any prior use, but does extend capability for those who need to set headers.