aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthieu Coudron <886074+teto@users.noreply.github.com>2026-08-16 23:47:37 +0200
committerGitHub <noreply@github.com>2026-08-16 18:47:37 -0300
commit2d2cc8eff2f03c23d142f8059146fb241dcf56b5 (patch)
tree068bbf68e640fe8d085fbc06677f8a83c5eda29f /src
parent19356435be7cff7cd9ac6c1a78f917ef3fcbc7a5 (diff)
downloadluarocks-2d2cc8eff2f03c23d142f8059146fb241dcf56b5.tar.gz
luarocks-2d2cc8eff2f03c23d142f8059146fb241dcf56b5.tar.bz2
luarocks-2d2cc8eff2f03c23d142f8059146fb241dcf56b5.zip
improve failure message to help user (#1918)main
* improve failure message to help user I was trying to run `:Rocks install rocks.nvim` from neovim, which results in: ``` luarocks "--force-lock" "--lua-version=5.1" "--tree=/home/teto/.local/share/nvim/rocks" "--server='https://luarocks.org/manifests/neorocks/'" "--server='https://lumen-oss.github.io/rocks-binaries/'" "install" "--force" "rocks.nvim"` Installing https://luarocks.org/rocks.nvim-2.49.0-1.src.rock Missing dependencies for rocks.nvim 2.49.0-1: nvim-nio (not installed) rtp.nvim (not installed) rocks.nvim 2.49.0-1 depends on lua 5.1 (5.1-1 provided by VM: success) rocks.nvim 2.49.0-1 depends on luarocks >= 3.11.1, < 4.0.0 (3.13.0-1 installed: success) rocks.nvim 2.49.0-1 depends on toml-edit >= 0.6.1 (0.7.0-1 installed: success) rocks.nvim 2.49.0-1 depends on fidget.nvim >= 1.1.0 (1.6.0-1 installed: success) rocks.nvim 2.49.0-1 depends on fzy (1.0.3-1 installed: success) rocks.nvim 2.49.0-1 depends on nvim-nio (not installed) Installing https://luarocks.org/nvim-nio-1.10.1-1.src.rock nvim-nio 1.10.1-1 is already installed in /home/teto/.local/share/nvim/rocks Use --force to reinstall. Error: Repository inconsistency detected (previously unfinished/corrupted installation?) ``` The error spaws from luarocks 3.13 so while the root problem of the dependency not being detect while already installed might already have been solved in newer releases. As rocks.nvim only displayed the last bit (maybe because of stderr vs stdout distinction ?), patching the error message is still helpful. * Update src/luarocks/deps.tl Co-authored-by: Hisham Muhammad <hisham@gobolinux.org> --------- Co-authored-by: Hisham Muhammad <hisham@gobolinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/deps.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/deps.tl b/src/luarocks/deps.tl
index db577c8b..4dbccb0e 100644
--- a/src/luarocks/deps.tl
+++ b/src/luarocks/deps.tl
@@ -241,7 +241,7 @@ function deps.fulfill_dependency(dep: Query, deps_mode: string, rocks_provided:
241 241
242 found, where = match_dep(dep, get_versions) 242 found, where = match_dep(dep, get_versions)
243 if not found then 243 if not found then
244 return nil, "Repository inconsistency detected (previously unfinished/corrupted installation?)" 244 return nil, "Repository inconsistency detected for dependency "..dep.name.." (previously unfinished/corrupted installation?)"
245 end 245 end
246 return true, found, where 246 return true, found, where
247end 247end