Merge pull request #14824 from MikeMcQuaid/cat_better_error

dev-cmd/cat: improve error message.
This commit is contained in:
Mike McQuaid 2023-02-27 17:54:48 +00:00 committed by GitHub
commit 810c7681f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,19 @@ module Homebrew
"cat" "cat"
end end
args.named.to_paths.each do |path|
next path if path.exist?
path = path.basename(".rb") if args.cask?
ofail "#{path}'s source doesn't exist on disk."
end
if Homebrew.failed?
$stderr.puts "The name may be wrong, or the tap hasn't been tapped."
return
end
safe_system pager, *args.named.to_paths safe_system pager, *args.named.to_paths
end end
end end