aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core/installer/context/init.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2023-10-13 21:14:29 +0200
committerWilliam Boman <william@redwill.se>2025-02-19 09:23:19 +0100
commitae208dc380808ff1aef39929a0e897e881571d43 (patch)
treeb9044cec7223062db69998189c76f8163ac9d58b /lua/mason-core/installer/context/init.lua
parentfix(location): use correct registry path (diff)
downloadmason-ae208dc380808ff1aef39929a0e897e881571d43.tar
mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.gz
mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.bz2
mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.lz
mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.xz
mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.zst
mason-ae208dc380808ff1aef39929a0e897e881571d43.zip
refactor: standardize constructors and improve inheritance construction
Diffstat (limited to 'lua/mason-core/installer/context/init.lua')
-rw-r--r--lua/mason-core/installer/context/init.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/lua/mason-core/installer/context/init.lua b/lua/mason-core/installer/context/init.lua
index f2cedb42..425bf39c 100644
--- a/lua/mason-core/installer/context/init.lua
+++ b/lua/mason-core/installer/context/init.lua
@@ -26,10 +26,10 @@ InstallContext.__index = InstallContext
---@param handle InstallHandle
---@param location InstallLocation
---@param opts PackageInstallOpts
-function InstallContext.new(handle, location, opts)
- local cwd = InstallContextCwd.new(handle, location)
- local spawn = InstallContextSpawn.new(handle, cwd, false)
- local fs = InstallContextFs.new(cwd)
+function InstallContext:new(handle, location, opts)
+ local cwd = InstallContextCwd:new(handle, location)
+ local spawn = InstallContextSpawn:new(handle, cwd, false)
+ local fs = InstallContextFs:new(cwd)
return setmetatable({
cwd = cwd,
spawn = spawn,
@@ -37,7 +37,7 @@ function InstallContext.new(handle, location, opts)
location = location,
package = handle.package, -- for convenience
fs = fs,
- receipt = receipt.InstallReceiptBuilder.new(),
+ receipt = receipt.InstallReceiptBuilder:new(),
stdio_sink = handle.stdio.sink,
links = {
bin = {},