aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core/installer/context/spawn.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/mason-core/installer/context/spawn.lua')
-rw-r--r--lua/mason-core/installer/context/spawn.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/lua/mason-core/installer/context/spawn.lua b/lua/mason-core/installer/context/spawn.lua
index 0a73ff3a..f2ce8df2 100644
--- a/lua/mason-core/installer/context/spawn.lua
+++ b/lua/mason-core/installer/context/spawn.lua
@@ -10,8 +10,14 @@ local InstallContextSpawn = {}
---@param handle InstallHandle
---@param cwd InstallContextCwd
---@param strict_mode boolean
-function InstallContextSpawn.new(handle, cwd, strict_mode)
- return setmetatable({ cwd = cwd, handle = handle, strict_mode = strict_mode }, InstallContextSpawn)
+function InstallContextSpawn:new(handle, cwd, strict_mode)
+ ---@type InstallContextSpawn
+ local instance = {}
+ setmetatable(instance, self)
+ instance.cwd = cwd
+ instance.handle = handle
+ instance.strict_mode = strict_mode
+ return instance
end
---@param cmd string