Skip to content

Commit 4ecd1f9

Browse files
committed
Fix missing requirement for uri
When loading configuration from an option file (using OpenSearch::CLI#load, which rely on OptionParser#load) and `uri` is not loaded, an undefined method exception is raised when an `url` option is parsed, but that exception is captured by the OptionParser logic resulting in the option file to be completely ignored. While #load return false to indicate the failure, consumers of the library are unlikely to check it because end users may or may not rely on option files. Unconditionally require uri to avoid this issue.
1 parent 7c4f490 commit 4ecd1f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/opensearch/cli.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
require "openssl"
44
require "optparse"
5+
require "uri"
56

67
module OpenSearch
78
class CLI < OptionParser

0 commit comments

Comments
 (0)