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

Raise on unknown/invalid curl flags #27

Merged

Conversation

kevinschweikert
Copy link
Collaborator

Closes #24

We need to raise instead of just logging a warning because with an unknown flag we do not know if it is just a boolean flag or needs a value. But instead of just the stacktrace, we can explain why we fail at this stage and help guide the user.

Example:

curl -k https://example.com would work if we would know that it's a boolean flag but when we parse it the URI gets set as the value for "-k" and the URI itself will be empty.

@derekkraan derekkraan merged commit 5654376 into derekkraan:main Dec 22, 2024
6 checks passed
@derekkraan
Copy link
Owner

@kevinschweikert can you add a changelog entry for this? I missed that in my initial check.

@derekkraan
Copy link
Owner

This is a breaking change, so I have bumped the version to 0.90.0.

@kevinschweikert
Copy link
Collaborator Author

I don't know exactly if it is breaking. As I showed in #24 it would produce a MatchError anyway, that's why I initially didn't provide a Changelog entry. But it's better to be transparent and on the safe side! Thanks for checking! Happy holidays 🎄

@derekkraan
Copy link
Owner

Ah, I see. Well, it has been released now anyways! Happy holidays!

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.

Handle/Warn on unsupported flags
2 participants