Skip to content

Commit e524b7d

Browse files
committed
cmd/search: --desc depends on --eval-all, not the other way around
- When the user tried `brew search foo` with `--eval-all` or its envvar, it would fail with `Error: Invalid usage: `--eval-all` cannot be passed without `--desc`.` - This was the wrong way around: `--desc` depends on `--eval-all`.
1 parent a190b1f commit e524b7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Library/Homebrew/cmd/search.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class SearchCmd < AbstractCommand
3636
description: "Search for casks."
3737
switch "--desc",
3838
description: "Search for formulae with a description matching <text> and casks with " \
39-
"a name or description matching <text>."
39+
"a name or description matching <text>.",
40+
depends_on: "--eval-all"
4041
switch "--eval-all",
41-
depends_on: "--desc",
4242
description: "Evaluate all available formulae and casks, whether installed or not, to search their " \
4343
"descriptions.",
4444
env: :eval_all

0 commit comments

Comments
 (0)