aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core
diff options
context:
space:
mode:
Diffstat (limited to 'lua/mason-core')
-rw-r--r--lua/mason-core/installer/managers/pypi.lua8
-rw-r--r--lua/mason-core/managers/pip3/init.lua4
2 files changed, 2 insertions, 10 deletions
diff --git a/lua/mason-core/installer/managers/pypi.lua b/lua/mason-core/installer/managers/pypi.lua
index 0f3de1fb..7c0e5bb9 100644
--- a/lua/mason-core/installer/managers/pypi.lua
+++ b/lua/mason-core/installer/managers/pypi.lua
@@ -72,13 +72,7 @@ function M.init(opts)
a.scheduler()
- local executables = platform.is.win
- and _.list_not_nil(
- vim.g.python3_host_prog and vim.fn.expand(vim.g.python3_host_prog),
- "python",
- "python3"
- )
- or _.list_not_nil(vim.g.python3_host_prog and vim.fn.expand(vim.g.python3_host_prog), "python3", "python")
+ local executables = platform.is.win and { "python", "python3" } or { "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.
ctx:promote_cwd()
diff --git a/lua/mason-core/managers/pip3/init.lua b/lua/mason-core/managers/pip3/init.lua
index 36ad6fc7..813bc9ea 100644
--- a/lua/mason-core/managers/pip3/init.lua
+++ b/lua/mason-core/managers/pip3/init.lua
@@ -48,9 +48,7 @@ function M.install(packages)
a.scheduler()
- local executables = platform.is.win
- and _.list_not_nil(vim.g.python3_host_prog and vim.fn.expand(vim.g.python3_host_prog), "python", "python3")
- or _.list_not_nil(vim.g.python3_host_prog and vim.fn.expand(vim.g.python3_host_prog), "python3", "python")
+ local executables = platform.is.win and { "python", "python3" } or { "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.
ctx:promote_cwd()