From 6ee823248f5fc433018ee800c22eef642e375bd1 Mon Sep 17 00:00:00 2001 From: William Boman Date: Mon, 26 Dec 2022 16:35:10 +0100 Subject: refactor(installer): introduce PackageInstallOpts class (#802) --- lua/mason-core/installer/context.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (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 132cc064..0b07b528 100644 --- a/lua/mason-core/installer/context.lua +++ b/lua/mason-core/installer/context.lua @@ -151,12 +151,8 @@ end local InstallContext = {} InstallContext.__index = InstallContext ----@class InstallContextOpts ----@field requested_version string? ----@field debug boolean? - ---@param handle InstallHandle ----@param opts InstallContextOpts +---@param opts PackageInstallOpts function InstallContext.new(handle, opts) local cwd_manager = CwdManager.new(path.install_prefix()) return setmetatable({ @@ -166,7 +162,7 @@ function InstallContext.new(handle, opts) package = handle.package, -- for convenience fs = ContextualFs.new(cwd_manager), receipt = receipt.InstallReceiptBuilder.new(), - requested_version = Optional.of_nilable(opts.requested_version), + requested_version = Optional.of_nilable(opts.version), stdio_sink = handle.stdio.sink, bin_links = {}, }, InstallContext) -- cgit v1.2.3-70-g09d2