Exception: Homebrew::CLI::OptionConstraintError

Inherits:
UsageError
  • Object
show all
Defined in:
cli/parser.rb

Instance Attribute Summary

Attributes inherited from UsageError

#reason

Instance Method Summary collapse

Methods inherited from UsageError

#to_s

Constructor Details

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

Returns a new instance of OptionConstraintError.



647
648
649
650
651
652
653
654
# File 'cli/parser.rb', line 647

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