25 lines
587 B
Ruby
Raw Normal View History

# typed: true
2022-09-28 21:57:13 -07:00
# frozen_string_literal: true
module Homebrew
module CLI
class Parser
undef set_default_options
2022-09-28 21:57:13 -07:00
undef validate_options
def set_default_options
@args["formula?"] = true if @args.respond_to?(:formula?)
end
2022-09-28 21:57:13 -07:00
def validate_options
return unless @args.respond_to?(:cask?)
return unless @args.cask?
# NOTE: We don't raise an error here because we don't want
# to print the help page or a stack trace.
odie "Invalid `--cask` usage: Casks do not work on Linux"
2022-09-28 21:57:13 -07:00
end
end
end
end