extend/ARGV: avoid assignment in argument list
Aside from being bad style, this also assigns to an unused variable.
This commit is contained in:
parent
b512834243
commit
2633f888d4
@ -29,14 +29,14 @@ module HomebrewArgvExtension
|
|||||||
f = Formulary.factory(name, spec)
|
f = Formulary.factory(name, spec)
|
||||||
if f.any_version_installed?
|
if f.any_version_installed?
|
||||||
tab = Tab.for_formula(f)
|
tab = Tab.for_formula(f)
|
||||||
resolved_spec = spec(default=nil) || tab.spec
|
resolved_spec = spec(nil) || tab.spec
|
||||||
f.set_active_spec(resolved_spec) if f.send(resolved_spec)
|
f.set_active_spec(resolved_spec) if f.send(resolved_spec)
|
||||||
f.build = tab
|
f.build = tab
|
||||||
end
|
end
|
||||||
f
|
f
|
||||||
else
|
else
|
||||||
rack = Formulary.to_rack(name)
|
rack = Formulary.to_rack(name)
|
||||||
Formulary.from_rack(rack, spec(default=nil))
|
Formulary.from_rack(rack, spec(nil))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user