From 11cb728c358fc56949f5dd910b292771315044af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan=20Grigoru=C8=9B=C4=83?= Date: Wed, 3 May 2023 20:21:15 +0300 Subject: [PATCH] fix(editorconfig): add missing root validation (cherry picked from commit a94d35fcde711d8053212ff134dbda8e83651d34) --- runtime/lua/editorconfig.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/lua/editorconfig.lua b/runtime/lua/editorconfig.lua index 43504a9713..69ba596085 100644 --- a/runtime/lua/editorconfig.lua +++ b/runtime/lua/editorconfig.lua @@ -202,6 +202,7 @@ local function parse(filepath, dir) end elseif key ~= nil and val ~= nil then if key == 'root' then + assert(val == 'true' or val == 'false', 'root must be either "true" or "false"') opts.root = val == 'true' elseif pat and pat:match_str(filepath) then opts[key] = val