Improve error message

Co-authored-by: Markus Reiter <me@reitermark.us>
This commit is contained in:
Carlo Cabrera 2024-09-06 16:39:55 +08:00 committed by GitHub
parent e6dd9fbd9c
commit 800df2a284
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,7 +87,7 @@ module Homebrew
end
elsif args.tap
tap = Tap.fetch(T.must(args.tap))
raise UsageError, "`--tap` without `--auto` cannot be used with official taps." if tap.official?
raise UsageError, "`--tap` requires `--auto` for official taps." if tap.official?
formulae = args.cask? ? [] : tap.formula_files.map { |path| Formulary.factory(path) }
casks = args.formula? ? [] : tap.cask_files.map { |path| Cask::CaskLoader.load(path) }