Method: Bundler::CLI::Config::Base#validate_scope!
- Defined in:
- lib/bundler/cli/config.rb
permalink #validate_scope! ⇒ Object
[View source]
179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/bundler/cli/config.rb', line 179 def validate_scope! @explicit_scope = true scopes = %w[global local].select {|s| [s] } case scopes.size when 0 @scope = inside_app? ? "local" : "global" @explicit_scope = false when 1 @scope = scopes.first else raise InvalidOption, "The options #{scopes.join " and "} were specified. Please only use one of the switches at a time." end end |