From a01d02ad7f680aec98a1e2ec35b04cedd307cfa8 Mon Sep 17 00:00:00 2001 From: William Boman Date: Sun, 12 Mar 2023 08:21:15 +0100 Subject: feat: add github registry source capabilities (#1091) --- lua/mason-core/installer/context.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lua/mason-core/installer/context.lua') diff --git a/lua/mason-core/installer/context.lua b/lua/mason-core/installer/context.lua index 8a1e3678..d637707a 100644 --- a/lua/mason-core/installer/context.lua +++ b/lua/mason-core/installer/context.lua @@ -117,6 +117,12 @@ function ContextualFs:mkdir(dir_path) return fs.async.mkdir(path.concat { self.cwd:get(), dir_path }) end +---@async +---@param dir_path string +function ContextualFs:mkdirp(dir_path) + return fs.async.mkdirp(path.concat { self.cwd:get(), dir_path }) +end + ---@async ---@param file_path string ---@param mode integer @@ -179,7 +185,7 @@ function InstallContext.new(handle, opts) local cwd_manager = CwdManager.new(path.install_prefix()) return setmetatable({ cwd = cwd_manager, - spawn = ContextualSpawn.new(cwd_manager, handle, handle.package.spec.schema ~= "registry+v1"), + spawn = ContextualSpawn.new(cwd_manager, handle, not handle.package:is_registry_spec()), handle = handle, package = handle.package, -- for convenience fs = ContextualFs.new(cwd_manager), -- cgit v1.2.3-70-g09d2