Exception: Homebrew::CLI::OptionConstraintError

Inherits:
RuntimeError
  • Object
show all
Defined in:
brew/Library/Homebrew/cli/parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(arg1, arg2, missing: false) ⇒ OptionConstraintError

Returns a new instance of OptionConstraintError



275
276
277
278
279
280
281
282
283
284
285
286
# File 'brew/Library/Homebrew/cli/parser.rb', line 275

def initialize(arg1, arg2, missing: false)
  if !missing
    message = <<~EOS
      `#{arg1}` and `#{arg2}` should be passed together.
    EOS
  else
    message = <<~EOS
      `#{arg2}` cannot be passed without `#{arg1}`.
    EOS
  end
  super message
end