aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core/managers
diff options
context:
space:
mode:
Diffstat (limited to 'lua/mason-core/managers')
-rw-r--r--lua/mason-core/managers/github/init.lua8
-rw-r--r--lua/mason-core/managers/go/init.lua2
-rw-r--r--lua/mason-core/managers/pip3/init.lua6
-rw-r--r--lua/mason-core/managers/std/init.lua2
4 files changed, 9 insertions, 9 deletions
diff --git a/lua/mason-core/managers/github/init.lua b/lua/mason-core/managers/github/init.lua
index a3cbd103..ebf98164 100644
--- a/lua/mason-core/managers/github/init.lua
+++ b/lua/mason-core/managers/github/init.lua
@@ -86,10 +86,10 @@ function M.release_file(opts)
end
if not asset_file then
error(
- ("Could not find which release file to download.\nMost likely the current operating system, architecture (%s), or libc (%s) is not supported."):format(
- platform.arch,
- platform.get_libc()
- ),
+ (
+ "Could not find which release file to download.\n"
+ .. "Most likely the current operating system or architecture is not supported (%s_%s)."
+ ):format(platform.sysname, platform.arch),
0
)
end
diff --git a/lua/mason-core/managers/go/init.lua b/lua/mason-core/managers/go/init.lua
index ffa2b6b0..e1831d0f 100644
--- a/lua/mason-core/managers/go/init.lua
+++ b/lua/mason-core/managers/go/init.lua
@@ -124,7 +124,7 @@ function M.get_installed_primary_package_version(receipt, install_dir)
.go({
"version",
"-m",
- platform.is_win and ("%s.exe"):format(executable) or executable,
+ platform.is.win and ("%s.exe"):format(executable) or executable,
cwd = install_dir,
})
:map_catching(function(result)
diff --git a/lua/mason-core/managers/pip3/init.lua b/lua/mason-core/managers/pip3/init.lua
index 078f4c3d..ace0b7db 100644
--- a/lua/mason-core/managers/pip3/init.lua
+++ b/lua/mason-core/managers/pip3/init.lua
@@ -12,7 +12,7 @@ local VENV_DIR = "venv"
local M = {}
local create_bin_path = _.compose(path.concat, function(executable)
- return _.append(executable, { VENV_DIR, platform.is_win and "Scripts" or "bin" })
+ return _.append(executable, { VENV_DIR, platform.is.win and "Scripts" or "bin" })
end, _.if_else(_.always(platform.is.win), _.format "%s.exe", _.identity))
---@param packages string[]
@@ -44,7 +44,7 @@ function M.install(packages)
pkgs[1] = ("%s==%s"):format(pkgs[1], version)
end)
- local executables = platform.is_win and _.list_not_nil(vim.g.python3_host_prog, "python", "python3")
+ local executables = platform.is.win and _.list_not_nil(vim.g.python3_host_prog, "python", "python3")
or _.list_not_nil(vim.g.python3_host_prog, "python3", "python")
-- pip3 will hardcode the full path to venv executables, so we need to promote cwd to make sure pip uses the final destination path.
@@ -161,7 +161,7 @@ end
---@param install_dir string
function M.venv_path(install_dir)
- return path.concat { install_dir, VENV_DIR, platform.is_win and "Scripts" or "bin" }
+ return path.concat { install_dir, VENV_DIR, platform.is.win and "Scripts" or "bin" }
end
return M
diff --git a/lua/mason-core/managers/std/init.lua b/lua/mason-core/managers/std/init.lua
index ea55654a..9e029664 100644
--- a/lua/mason-core/managers/std/init.lua
+++ b/lua/mason-core/managers/std/init.lua
@@ -157,7 +157,7 @@ end
---@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
+ if platform.is.unix then
local ctx = installer.context()
ctx.spawn.chmod { flags, files }
end