Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: hererocks build step should use vim.g.python3_host_prog if set #1769

Open
4 tasks done
lsvmello opened this issue Oct 3, 2024 · 1 comment
Open
4 tasks done
Labels
bug Something isn't working stale

Comments

@lsvmello
Copy link

lsvmello commented Oct 3, 2024

Did you check docs and existing issues?

  • I have read all the lazy.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of lazy.nvim
  • 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.

local python = vim.tbl_filter(function(p)
return vim.fn.executable(p) == 1
end, M.python)[1]

To fix this issue Neovim introduced g:python3_host_prog

Steps To Reproduce

  1. Windows machine with python and chocolatey installed
  2. Install rest-nvim/rest.nvim with hererocks enabled (as on repro below)

Expected Behavior

  • If g:python3_host_prog is 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,
  },
})
@lsvmello lsvmello added the bug Something isn't working label Oct 3, 2024
Copy link
Contributor

github-actions bot commented Nov 3, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

1 participant