aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/mason-core/package/init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/mason-core/package/init.lua b/lua/mason-core/package/init.lua
index ec4bf8f1..1627c1ec 100644
--- a/lua/mason-core/package/init.lua
+++ b/lua/mason-core/package/init.lua
@@ -101,7 +101,10 @@ function Package:install(opts)
-- This function is not expected to be run in async scope, so we create
-- a new scope here and handle the result callback-style.
a.run(
- installer.execute,
+ function(...)
+ -- we wrap installer.execute for testing purposes (to allow spy objects)
+ return installer.execute(...)
+ end,
---@param success boolean
---@param result Result
function(success, result)