diff options
Diffstat (limited to 'lua/mason-core/installer/context/cwd.lua')
| -rw-r--r-- | lua/mason-core/installer/context/cwd.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lua/mason-core/installer/context/cwd.lua b/lua/mason-core/installer/context/cwd.lua index cb2e70ec..2b74bf55 100644 --- a/lua/mason-core/installer/context/cwd.lua +++ b/lua/mason-core/installer/context/cwd.lua @@ -11,13 +11,15 @@ InstallContextCwd.__index = InstallContextCwd ---@param handle InstallHandle ---@param location InstallLocation -function InstallContextCwd.new(handle, location) +function InstallContextCwd:new(handle, location) assert(location, "location not provided") - return setmetatable({ - location = location, - handle = handle, - cwd = nil, - }, InstallContextCwd) + ---@type InstallContextCwd + local instance = {} + setmetatable(instance, self) + instance.location = location + instance.handle = handle + instance.cwd = nil + return instance end function InstallContextCwd:initialize() |
