fix(health): bad format() call #34906

Problem:
Bad format() call on PUC Lua

    Error: Failed to run healthcheck for "vim.health" plugin. Exception:
    runtime/lua/vim/health/health.lua:89: bad argument #1 to 'format' (string expected, got nil)

Solution:
Avoid passing nil.

(cherry picked from commit 2422fbdd5f)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
This commit is contained in:
neovim-backports[bot]
2025-07-12 11:32:56 -07:00
committed by GitHub
parent 91ef8606f2
commit 7da0c46e1b

View File

@ -87,9 +87,9 @@ local function check_config()
health.error(
'Locale does not support UTF-8. Unicode characters may not display correctly.'
.. ('\n$LANG=%s $LC_ALL=%s $LC_CTYPE=%s'):format(
vim.env.LANG,
vim.env.LC_ALL,
vim.env.LC_CTYPE
vim.env.LANG or '',
vim.env.LC_ALL or '',
vim.env.LC_CTYPE or ''
),
{
'If using tmux, try the -u option.',