aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core/managers/std/init.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-08-15 21:03:06 +0200
committerGitHub <noreply@github.com>2022-08-15 21:03:06 +0200
commit3c62386a396ae0c1cd7adbaacc379eb4af072a65 (patch)
tree4d00d20958839a04e6a996c11b97724c762e491a /lua/mason-core/managers/std/init.lua
parentchore: update generated code (#295) (diff)
downloadmason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.gz
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.bz2
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.lz
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.xz
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.zst
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.zip
refactor: introduce selene, harden type defs, and use proper EmmyLua syntax (#296)
Diffstat (limited to 'lua/mason-core/managers/std/init.lua')
-rw-r--r--lua/mason-core/managers/std/init.lua19
1 files changed, 5 insertions, 14 deletions
diff --git a/lua/mason-core/managers/std/init.lua b/lua/mason-core/managers/std/init.lua
index a0f9ecc9..ea55654a 100644
--- a/lua/mason-core/managers/std/init.lua
+++ b/lua/mason-core/managers/std/init.lua
@@ -17,16 +17,7 @@ end
---@async
---@param executable string
----@param opts {help_url:string|nil}
-function M.system_executable(executable, opts)
- return function()
- M.ensure_executable(executable, opts).with_receipt()
- end
-end
-
----@async
----@param executable string
----@param opts {help_url:string|nil}
+---@param opts {help_url:string?}?
function M.ensure_executable(executable, opts)
local ctx = installer.context()
opts = opts or {}
@@ -104,7 +95,7 @@ end
---@async
---@param file string
----@param opts {strip_components:integer}|nil
+---@param opts {strip_components:integer}?
function M.untar(file, opts)
opts = opts or {}
local ctx = installer.context()
@@ -121,7 +112,7 @@ end
---@async
---@param file string
----@param opts {strip_components:integer}|nil
+---@param opts {strip_components: integer?}?
function M.untarxz(file, opts)
opts = opts or {}
local ctx = installer.context()
@@ -163,8 +154,8 @@ function M.gunzip(file)
end
---@async
----@param flags string: The chmod flag to apply.
----@param files string[]: A list of relative paths to apply the chmod on.
+---@param flags string The chmod flag to apply.
+---@param files string[] A list of relative paths to apply the chmod on.
function M.chmod(flags, files)
if platform.is_unix then
local ctx = installer.context()