From 5063ba98dc220a754caf68e510fb192755b1bdf0 Mon Sep 17 00:00:00 2001 From: William Boman Date: Sun, 16 Feb 2025 17:07:22 +0100 Subject: refactor: turn StdioSink into a proper class --- lua/mason-core/installer/managers/std.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua/mason-core/installer/managers/std.lua') diff --git a/lua/mason-core/installer/managers/std.lua b/lua/mason-core/installer/managers/std.lua index b4eb11ab..701bb6c9 100644 --- a/lua/mason-core/installer/managers/std.lua +++ b/lua/mason-core/installer/managers/std.lua @@ -95,7 +95,7 @@ end function M.download_file(url, out_file) log.fmt_debug("std: downloading file %s", url, out_file) local ctx = installer.context() - ctx.stdio_sink.stdout(("Downloading file %q…\n"):format(url)) + ctx.stdio_sink:stdout(("Downloading file %q…\n"):format(url)) return fetch(url, { out_file = path.concat { ctx.cwd:get(), out_file }, }):map_err(function(err) @@ -234,7 +234,7 @@ local unpack_by_filename = _.cond { function M.unpack(rel_path) log.fmt_debug("std: unpack %s", rel_path) local ctx = installer.context() - ctx.stdio_sink.stdout((("Unpacking %q…\n"):format(rel_path))) + ctx.stdio_sink:stdout((("Unpacking %q…\n"):format(rel_path))) return unpack_by_filename(rel_path) end @@ -246,7 +246,7 @@ function M.clone(git_url, opts) opts = opts or {} log.fmt_debug("std: clone %s %s", git_url, opts) local ctx = installer.context() - ctx.stdio_sink.stdout((("Cloning git repository %q…\n"):format(git_url))) + ctx.stdio_sink:stdout((("Cloning git repository %q…\n"):format(git_url))) return Result.try(function(try) try(ctx.spawn.git { "clone", -- cgit v1.2.3-70-g09d2