aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-08-27 00:43:59 +0200
committerGitHub <noreply@github.com>2022-08-27 00:43:59 +0200
commit7850abea79280ef2b871ec5a6d87d880288c96fd (patch)
treebfa7527fda464bfd3f3b28deb3b55627d9bf685f
parentfeat: add solhint linter for Solidity code (#342) (diff)
downloadmason-7850abea79280ef2b871ec5a6d87d880288c96fd.tar
mason-7850abea79280ef2b871ec5a6d87d880288c96fd.tar.gz
mason-7850abea79280ef2b871ec5a6d87d880288c96fd.tar.bz2
mason-7850abea79280ef2b871ec5a6d87d880288c96fd.tar.lz
mason-7850abea79280ef2b871ec5a6d87d880288c96fd.tar.xz
mason-7850abea79280ef2b871ec5a6d87d880288c96fd.tar.zst
mason-7850abea79280ef2b871ec5a6d87d880288c96fd.zip
fix(fetch): use /dev/null logfile for wget (#345)
Closes #332.
-rw-r--r--lua/mason-core/fetch.lua2
-rw-r--r--tests/mason-core/fetch_spec.lua4
2 files changed, 6 insertions, 0 deletions
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",