Skip to content

Commit 5913a7a

Browse files
jonbarlohsbt
authored andcommitted
code refactor: addresing peer comments
1 parent 41a7d09 commit 5913a7a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bundler/lib/bundler/settings/validator.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ def self.validate!(key, value, settings)
7777

7878
rule %w[default_cli_command], "default_cli_command must be either 'install' or 'cli_help'" do |key, value, settings|
7979
valid_values = %w[install cli_help]
80-
if value.nil?
81-
fail!(key, value, "must be one of: #{valid_values.join(", ")}")
82-
elsif !valid_values.include?(value.to_s)
80+
if !value.nil? && !valid_values.include?(value.to_s)
8381
fail!(key, value, "must be one of: #{valid_values.join(", ")}")
8482
end
8583
end

0 commit comments

Comments
 (0)