Skip to content

fix(health): check hererocks' luarocks.bat on Windows - #2185

Open
cstrahan wants to merge 1 commit into
folke:mainfrom
cstrahan:fix/hererocks-health-windows
Open

cstrahan wants to merge 1 commit into
folke:mainfrom
cstrahan:fix/hererocks-health-windows

Conversation

@cstrahan

Copy link
Copy Markdown

Description

On Windows, hererocks installs lazy-rocks/hererocks/bin/luarocks.bat. M.build() already spawns it with the .bat extension (rockspec.lua, if Util.is_win then luarocks = luarocks .. ".bat" end), but the health check (M.check()) passes M.hererocks.bin("luarocks") without it. vim.fn.executable() accepts the extensionless path (PATHEXT), but spawning it fails, so :checkhealth lazy reports a working install as broken:

- ❌ ERROR failed to get version of {C:/Users/.../nvim-data/lazy-rocks/hererocks/bin/luarocks}
  Failed to spawn process C:/Users/.../nvim-data/lazy-rocks/hererocks/bin/luarocks {
- ❌ ERROR {C:/Users/.../nvim-data/lazy-rocks/hererocks/bin/luarocks} not installed
- ⚠️ WARNING Lazy won't be able to install plugins that require `luarocks`.

This uses luarocks.bat on Windows in the health check too.

Tested on Windows 10 with Neovim 0.12.5 and a hererocks install (Lua 5.1.5, LuaRocks 3.8.0):

  • require("lazy.manage.process").exec({ ".../bin/luarocks", "--version" }) fails to spawn; with .../bin/luarocks.bat it returns exit code 0 and LuaRocks' version;
  • :checkhealth lazy before: 2 errors and the warning above; after: ✅ OK {.../bin/luarocks.bat} ... 3.8.0 and no luarocks errors or warnings.

Related Issue(s)

None that I found.

🤖 Generated with Claude Code

On Windows, hererocks installs `bin/luarocks.bat`. The build already spawns it
with the `.bat` extension, but the health check spawned `bin/luarocks`, which
`vim.fn.executable()` accepts (PATHEXT) but the process can't be spawned
without the extension. So a working hererocks install was reported as
"failed to get version of ..." and "... not installed".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size/s Small PR (<10 lines changed) label Sep 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s Small PR (<10 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant