Make error message clearer
Co-authored-by: Bo Anderson <mail@boanderson.me>
This commit is contained in:
parent
4c2d903738
commit
933129dcdb
@ -1616,7 +1616,7 @@ class Formula
|
|||||||
sig { params(source: Pathname, target: Pathname).returns(String) }
|
sig { params(source: Pathname, target: Pathname).returns(String) }
|
||||||
def rpath(source: bin, target: lib)
|
def rpath(source: bin, target: lib)
|
||||||
unless target.to_s.start_with?(HOMEBREW_PREFIX)
|
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
|
end
|
||||||
|
|
||||||
"#{loader_path}/#{target.relative_path_from(source)}"
|
"#{loader_path}/#{target.relative_path_from(source)}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user