Fix args validation
This commit is contained in:
parent
2902eec390
commit
6d19b84ef1
@ -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
|
||||
|
||||
|
||||
@ -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 }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user