From f1e58d3ce7ab3bdb3036b791811896a0220703ad Mon Sep 17 00:00:00 2001 From: William Boman Date: Fri, 13 Oct 2023 01:53:41 +0200 Subject: refactor(path): use InstallLocation to produce paths, remove static path methods --- lua/mason-core/path.lua | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'lua/mason-core/path.lua') diff --git a/lua/mason-core/path.lua b/lua/mason-core/path.lua index 3d7c8668..9eeed3ba 100644 --- a/lua/mason-core/path.lua +++ b/lua/mason-core/path.lua @@ -27,44 +27,4 @@ function M.is_subdirectory(root_path, path) return root_path == path or path:sub(1, #root_path + 1) == root_path .. sep end ----@param dir string? -function M.install_prefix(dir) - local settings = require "mason.settings" - return M.concat { settings.current.install_root_dir, dir } -end - ----@param executable string? -function M.bin_prefix(executable) - return M.concat { M.install_prefix "bin", executable } -end - ----@param file string? -function M.share_prefix(file) - return M.concat { M.install_prefix "share", file } -end - ----@param file string? -function M.opt_prefix(file) - return M.concat { M.install_prefix "opt", file } -end - ----@param name string? -function M.package_prefix(name) - return M.concat { M.install_prefix "packages", name } -end - ----@param name string? -function M.package_build_prefix(name) - return M.concat { M.install_prefix "staging", name } -end - ----@param name string -function M.package_lock(name) - return M.package_build_prefix(("%s.lock"):format(name)) -end - -function M.registry_prefix() - return M.install_prefix "registries" -end - return M -- cgit v1.2.3-70-g09d2