Skip to content
Snippets Groups Projects
Unverified Commit 4f732a01 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

cmd/info: fix --json argument handling.

`--all` and `--installed` do not require formulae arguments.

Fixes https://github.com/Homebrew/brew/issues/6842
parent d556d02c
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,9 @@ module Homebrew
if args.json
raise UsageError, "Invalid JSON version: #{args.json}" unless ["v1", true].include? args.json
raise UsageError, "This command's option requires a formula argument" if ARGV.named.empty?
if !(args.all? || args.installed?) && ARGV.named.blank?
raise UsageError, "This command's option requires a formula argument"
end
print_json
elsif args.github?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment