From b2b40dbbde21cf86bb92b7c2d40d31c167f5e848 Mon Sep 17 00:00:00 2001 From: William Boman Date: Mon, 11 Jul 2022 20:01:09 +0200 Subject: fix(async): increase vim.wait time (#55) This number is completely arbitrary - the previous value was chosen at random. Increasing it now to support long-running, blocking, installations. --- lua/mason-core/async/init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lua/mason-core/async/init.lua') diff --git a/lua/mason-core/async/init.lua b/lua/mason-core/async/init.lua index c79c6e42..cf1580a8 100644 --- a/lua/mason-core/async/init.lua +++ b/lua/mason-core/async/init.lua @@ -122,9 +122,11 @@ exports.run_blocking = function(suspend_fn, ...) result = b end, ...) - if vim.wait(60000, function() - return resolved == true - end, 50) then + if + vim.wait(60 * 60 * 1000, function() -- the wait time is completely arbitrary + return resolved == true + end, 50) + then if not ok then error(result, 2) end -- cgit v1.2.3-70-g09d2