diff options
| author | William Boman <william@redwill.se> | 2026-05-22 20:14:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-22 20:14:45 +0200 |
| commit | 24e77d5289db0f7b6f4b405683047315b66dc75b (patch) | |
| tree | 1d40c97d129c8d621d9c9d0645c7c268b49505b2 /lua/mason-core/result.lua | |
| parent | feat(registry): add registry_cache setting for controlling cache behaviour (#... (diff) | |
| download | mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar.gz mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar.bz2 mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar.lz mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar.xz mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar.zst mason-24e77d5289db0f7b6f4b405683047315b66dc75b.zip | |
feat: add support for socket.dev firewall client (#2088)
Diffstat (limited to 'lua/mason-core/result.lua')
| -rw-r--r-- | lua/mason-core/result.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/mason-core/result.lua b/lua/mason-core/result.lua index e98a11b3..27c46862 100644 --- a/lua/mason-core/result.lua +++ b/lua/mason-core/result.lua @@ -189,7 +189,8 @@ function Result.try(fn) local thread = coroutine.create(fn) local step step = function(...) - local ok, result = coroutine.resume(thread, ...) + local results = { coroutine.resume(thread, ...) } + local ok, result = results[1], results[2] if not ok then return Result.failure(result) end @@ -207,7 +208,7 @@ function Result.try(fn) end else -- yield to parent coroutine - return step(coroutine.yield(result)) + return step(coroutine.yield(result, unpack(results, 3))) end end return step(coroutine.yield) |
