cask: remove old prefix placeholder

This was just a temporary workaround while we
waited for the API to regenerate the JSON content.
This commit is contained in:
apainintheneck 2023-03-18 16:42:44 -07:00
parent 5550aa215e
commit 3aae28aa0d
2 changed files with 0 additions and 6 deletions

View File

@ -23,9 +23,6 @@ module Cask
HOMEBREW_PREFIX_PLACEHOLDER = "$HOMEBREW_PREFIX"
APPDIR_PLACEHOLDER = "$APPDIR"
# TODO: can be removed when API JSON is regenerated with HOMEBREW_PREFIX_PLACEHOLDER.
HOMEBREW_OLD_PREFIX_PLACEHOLDER = "$(brew --prefix)"
attr_reader :token, :sourcefile_path, :source, :config, :default_config, :loader
attr_accessor :download, :allow_reassignment

View File

@ -326,13 +326,10 @@ module Cask
end
def from_h_string_gsubs(string, appdir)
# TODO: HOMEBREW_OLD_PREFIX_PLACEHOLDER can be removed when API JSON is
# regenerated with HOMEBREW_PREFIX_PLACEHOLDER.
string.to_s
.gsub(Cask::HOME_PLACEHOLDER, Dir.home)
.gsub(Cask::HOMEBREW_PREFIX_PLACEHOLDER, HOMEBREW_PREFIX)
.gsub(Cask::APPDIR_PLACEHOLDER, appdir)
.gsub(Cask::HOMEBREW_OLD_PREFIX_PLACEHOLDER, HOMEBREW_PREFIX)
end
def from_h_array_gsubs(array, appdir)