From 7da0c46e1bc98d5f86bd32b7bee6ee1222853da2 Mon Sep 17 00:00:00 2001 From: "neovim-backports[bot]" <175700243+neovim-backports[bot]@users.noreply.github.com> Date: Sat, 12 Jul 2025 11:32:56 -0700 Subject: [PATCH] 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 2422fbdd5f90326b793c8add448b9192e389c181) Co-authored-by: Justin M. Keyes --- runtime/lua/vim/health/health.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/lua/vim/health/health.lua b/runtime/lua/vim/health/health.lua index dd6fe7f608..8f897b756c 100644 --- a/runtime/lua/vim/health/health.lua +++ b/runtime/lua/vim/health/health.lua @@ -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.',