From 7850abea79280ef2b871ec5a6d87d880288c96fd Mon Sep 17 00:00:00 2001 From: William Boman Date: Sat, 27 Aug 2022 00:43:59 +0200 Subject: fix(fetch): use /dev/null logfile for wget (#345) Closes #332. --- lua/mason-core/fetch.lua | 2 ++ tests/mason-core/fetch_spec.lua | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lua/mason-core/fetch.lua b/lua/mason-core/fetch.lua index ea396ca2..f58dcd8d 100644 --- a/lua/mason-core/fetch.lua +++ b/lua/mason-core/fetch.lua @@ -71,6 +71,8 @@ local function fetch(url, opts) .wget({ headers, "-nv", + "-o", + "/dev/null", "-O", opts.out_file or "-", ("--method=%s"):format(opts.method), diff --git a/tests/mason-core/fetch_spec.lua b/tests/mason-core/fetch_spec.lua index a6237ff1..a14842f9 100644 --- a/tests/mason-core/fetch_spec.lua +++ b/tests/mason-core/fetch_spec.lua @@ -25,6 +25,8 @@ describe("fetch", function() "--header=X-Custom-Header: here", }, "-nv", + "-o", + "/dev/null", "-O", "-", "--method=GET", @@ -80,6 +82,8 @@ describe("fetch", function() "--header=User-Agent: mason.nvim (+https://github.com/williamboman/mason.nvim)", }, "-nv", + "-o", + "/dev/null", "-O", "/test.json", "--method=GET", -- cgit v1.2.3-70-g09d2