info: Fix style: Use a guard clause
Fix the style error: Library/Homebrew/cmd/info.rb:88:7: C: Use a guard clause instead of wrapping the code inside a conditional expression.
This commit is contained in:
parent
930f7b90dc
commit
d5b2415c87
@ -85,11 +85,8 @@ module Homebrew
|
||||
def info
|
||||
info_args.parse
|
||||
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
|
||||
else
|
||||
raise UsageError, "invalid JSON version: #{args.json}"
|
||||
end
|
||||
elsif args.github?
|
||||
exec_browser(*ARGV.formulae.map { |f| github_info(f) })
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user