cask: replace Caskroom in API for relocated artifacts

This commit is contained in:
Bo Anderson 2023-02-13 04:33:53 +00:00
parent ed79381155
commit 526871896c
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -317,9 +317,12 @@ module Cask
def to_h_string_gsubs(string, replace_prefix: true)
string = string.to_s.gsub(Dir.home, "$HOME")
return string unless replace_prefix
if replace_prefix
string.gsub(HOMEBREW_PREFIX, "$(brew --prefix)")
else
string.gsub(Caskroom.path, "$(brew --prefix)/Caskroom")
end
end
def to_h_array_gsubs(array)