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

Fix: GLI usage breaking faraday >= 2.7.0. #41

Merged
merged 2 commits into from
Dec 22, 2022

Conversation

dblock
Copy link
Member

@dblock dblock commented Dec 22, 2022

Signed-off-by: dblock dblock@amazon.com

Description

This is the same problem as in slack-ruby/slack-ruby-client#434.

When using include at the top level, the module gets included in the Object class. Faraday::Middleware checks whether it responds to on_error, which then finds GLI's on_error, which has a different signature and meaning. This resolves that by wrapping the entire cli in a class so that GLI::App is not included in Object.

We also use GLI's built-in commands_from method to avoid having to reference every command file individually.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
@dblock dblock merged commit 3716e3a into opensearch-project:main Dec 22, 2022
@dblock dblock deleted the fix-faraday-2.7 branch December 22, 2022 15:21
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.

1 participant