Simplify ARGV.filter_for_dependencies
This commit is contained in:
parent
3b68723fa8
commit
0f4f7aa271
@ -178,16 +178,9 @@ module HomebrewArgvExtension
|
|||||||
end
|
end
|
||||||
|
|
||||||
def filter_for_dependencies
|
def filter_for_dependencies
|
||||||
# Clears some flags that affect installation, yields to a block, then
|
|
||||||
# restores to original state.
|
|
||||||
old_args = clone
|
old_args = clone
|
||||||
|
delete "--devel"
|
||||||
flags_to_clear = %w[
|
delete "--HEAD"
|
||||||
--devel
|
|
||||||
--HEAD
|
|
||||||
]
|
|
||||||
flags_to_clear.each {|flag| delete flag}
|
|
||||||
|
|
||||||
yield
|
yield
|
||||||
ensure
|
ensure
|
||||||
replace(old_args)
|
replace(old_args)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user