diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 4f092c4682..23c8beda65 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -85,11 +85,8 @@ module Homebrew def info info_args.parse if args.json - if args.json == "v1" || args.json == true - print_json - else - raise UsageError, "invalid JSON version: #{args.json}" - end + raise UsageError, "invalid JSON version: #{args.json}" unless ["v1", true].include? args.json + print_json elsif args.github? exec_browser(*ARGV.formulae.map { |f| github_info(f) }) else