lazy.nvim
lazy.nvim copied to clipboard
bug: `hererocks` build step should use `vim.g.python3_host_prog` if set
Did you check docs and existing issues?
- [X] I have read all the lazy.nvim docs
- [X] I have updated the plugin to the latest version before submitting this issue
- [X] I have searched the existing issues of lazy.nvim
- [X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
v0.10.1
Operating system/version
Windows 11
Describe the bug
The build step of hererocks use vim.fn.executable to find python, and this causes conflicts on Windows that have chocolatey installed, because chocolatey ships a python executable.
https://github.com/folke/lazy.nvim/blob/1159bdccd8910a0fd0914b24d6c3d186689023d9/lua/lazy/pkg/rockspec.lua#L36-L38
To fix this issue Neovim introduced g:python3_host_prog
Steps To Reproduce
- Windows machine with python and chocolatey installed
- Install
rest-nvim/rest.nvimwithhererocksenabled (as on repro below)
Expected Behavior
- If
g:python3_host_progis set: use it as python executable - Else: use the current logic as fallback.
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
{ "rest-nvim/rest.nvim" },
},
rocks = {
enabled = true,
hererocks = true,
},
})