echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
5k stars 185 forks source link

deps performs invalid envsubst invocation #891

Closed bluebrown closed 4 months ago

bluebrown commented 4 months ago

Contributing guidelines

Module(s)

mini.deps

Description

I installed neovim 0.11 today, and wiped all my local state. Now when I open nvim I get the following warning for most (all?), my plugins

(mini.deps) Warnings in `oil.nvim` during installing plugin
flag provided but not defined: -variables
Usage: envsubst [options...] <input>
....

Neovim version

v0.11.0-dev-25+g0e187fe03

Steps to reproduce

Clean local state and move deps snapshot then use the below init.lua

local path_package = vim.fn.stdpath("data") .. "/site/"
local mini_path = path_package .. "pack/deps/start/mini.nvim"
if not vim.loop.fs_stat(mini_path) then
  vim.cmd('echo "Installing `mini.nvim`" | redraw')
  local clone_cmd = { "git", "clone", "--filter=blob:none", "https://github.com/echasnovski/mini.nvim", mini_path }
  vim.fn.system(clone_cmd)
  vim.cmd("packadd mini.nvim | helptags ALL")
  vim.cmd('echo "Installed `mini.nvim`" | redraw')
end
require("mini.deps").setup({ path = { package = path_package } })
local add, now, later = MiniDeps.add, MiniDeps.now, MiniDeps.later

now(function()
  add("stevearc/oil.nvim")
  require("oil").setup()
  vim.keymap.set("n", "-", "<CMD>Oil<CR>")
end)

Expected behavior

It should start without warning.

Actual behavior

Receiving warnings in :messages

(mini.deps) Installing `oil.nvim`
(mini.deps) (1/1) Installed `oil.nvim`
(mini.deps) Warnings in `oil.nvim` during installing plugin
flag provided but not defined: -variables
Usage: envsubst [options...] <input>
Options:
  -i         Specify file input, otherwise use last argument as input file.
             If no input file is specified, read from stdin.
  -o         Specify file output. If none is specified, write to stdout.
  -no-unset  Fail if a variable is not set.
  -no-empty  Fail if a variable is set but empty.
  -fail-fast Fail on first error otherwise display all failures if restrictions are set.

Interesting to note, that plugin is still successful installed. I can in fact use it.

bluebrown commented 4 months ago

well, I cant find any evidence of ensubst usage in this repo.

I tried to do it on another machine, and so far I was not able to reproduce the error. Perhaps this environment is broken somehow. I still wonder why this is showing up at this specific moment.

echasnovski commented 4 months ago

well, I cant find any evidence of ensubst usage in this repo.

I tried to do it on another machine, and so far I was not able to reproduce the error. Perhaps this environment is broken somehow. I still wonder why this is showing up at this specific moment.

Yes, indeed, there is no direct usage of envsubst in 'mini.nvim', let alone 'mini.deps'.

My best guess is that you built Neovim from source and have not compatible envsubst installation on that particular machine. Judging by a8m/envsubst#10, there is some discrepancy depending on the how envsubst was installed (the GNU version supports this flag). There is a mention of gettext which is a Neovim dependency which is being dealt with recently (no direct proof from me, as I don't have full picture here).

And I am fairly certain that even if this is reliably reproducible, it has nothing to do with 'mini.deps' per se (here another issue which says that this occurs with other CLI tools). Closing as not an issue with 'mini.deps'.