Make error message clearer

Co-authored-by: Bo Anderson <mail@boanderson.me>
This commit is contained in:
Carlo Cabrera 2022-10-08 11:43:43 +08:00 committed by GitHub
parent 4c2d903738
commit 933129dcdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1616,7 +1616,7 @@ class Formula
sig { params(source: Pathname, target: Pathname).returns(String) }
def rpath(source: bin, target: lib)
unless target.to_s.start_with?(HOMEBREW_PREFIX)
raise "`target` should only be used for paths inside HOMEBREW_PREFIX!"
raise "rpath `target` should only be used for paths inside HOMEBREW_PREFIX!"
end
"#{loader_path}/#{target.relative_path_from(source)}"