Merge pull request #14824 from MikeMcQuaid/cat_better_error
dev-cmd/cat: improve error message.
This commit is contained in:
commit
810c7681f9
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user