summaryrefslogtreecommitdiff
path: root/lib/bundler/settings
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/settings')
-rw-r--r--lib/bundler/settings/validator.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/bundler/settings/validator.rb b/lib/bundler/settings/validator.rb
index 9aa1627fb2..70a0ca36d4 100644
--- a/lib/bundler/settings/validator.rb
+++ b/lib/bundler/settings/validator.rb
@@ -74,6 +74,13 @@ module Bundler
fail!(key, value, "`#{other_key}` is current set to #{other_setting.inspect}", "the `#{conflicting.join("`, `")}` groups conflict")
end
end
+
+ rule %w[default_cli_command], "default_cli_command must be either 'install' or 'cli_help'" do |key, value, _settings|
+ valid_values = %w[install cli_help]
+ if !value.nil? && !valid_values.include?(value.to_s)
+ fail!(key, value, "must be one of: #{valid_values.join(", ")}")
+ end
+ end
end
end
end