aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core/installer/context/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/mason-core/installer/context/init.lua')
-rw-r--r--lua/mason-core/installer/context/init.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/lua/mason-core/installer/context/init.lua b/lua/mason-core/installer/context/init.lua
index 44490782..b22c562b 100644
--- a/lua/mason-core/installer/context/init.lua
+++ b/lua/mason-core/installer/context/init.lua
@@ -109,6 +109,12 @@ function InstallContext:chdir(rel_path, fn)
end
end
+---@async
+---@param fn fun(resolve: fun(result: any), reject: fun(error: any))
+function InstallContext:await(fn)
+ return a.wait(fn)
+end
+
---@param new_executable_rel_path string Relative path to the executable file to create.
---@param script_rel_path string Relative path to the Node.js script.
function InstallContext:write_node_exec_wrapper(new_executable_rel_path, script_rel_path)