diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index caba761017..daae55e9b5 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -404,7 +404,10 @@ module Homebrew end unless ignore_invalid_options - validate_options unless @is_dev_cmd + unless @is_dev_cmd + set_default_options + validate_options + end check_constraint_violations check_named_args(named_args) end @@ -424,6 +427,9 @@ module Homebrew @args end + sig { void } + def set_default_options; end + sig { void } def validate_options; end diff --git a/Library/Homebrew/extend/os/linux/cli/parser.rb b/Library/Homebrew/extend/os/linux/cli/parser.rb index fbdedd567e..b8de7c5aa1 100644 --- a/Library/Homebrew/extend/os/linux/cli/parser.rb +++ b/Library/Homebrew/extend/os/linux/cli/parser.rb @@ -11,7 +11,7 @@ module OS sig { void } def set_default_options - args.table[:formula?] = true if args.respond_to?(:formula?) + args.table[:formula?] = true end sig { void }