Merge pull request #5482 from sjackman/info-json
info: Fix style: Use a guard clause
This commit is contained in:
commit
66894b6b27
@ -85,11 +85,8 @@ module Homebrew
|
|||||||
def info
|
def info
|
||||||
info_args.parse
|
info_args.parse
|
||||||
if args.json
|
if args.json
|
||||||
if args.json == "v1" || args.json == true
|
raise UsageError, "invalid JSON version: #{args.json}" unless ["v1", true].include? args.json
|
||||||
print_json
|
print_json
|
||||||
else
|
|
||||||
raise UsageError, "invalid JSON version: #{args.json}"
|
|
||||||
end
|
|
||||||
elsif args.github?
|
elsif args.github?
|
||||||
exec_browser(*ARGV.formulae.map { |f| github_info(f) })
|
exec_browser(*ARGV.formulae.map { |f| github_info(f) })
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user